这名用户暂未设置签名。
追踪最近的用户名外显变动记录。
最近的文章、讨论、云剪贴板与社区记录
在讨论《80pts,__int128为什么过不了最后两个点?》回复:
```python Multi-objective particle swarm optimization algorithm (MOPSO) Inputs: population size, maximum number of iterations, inertia weights, learning factors…
```cpp #include using namespace std; const int maxn=1e5+10; int n,k,cnt,root; struct edge { int to,nxt; }e[maxn deep >n>>k; for (int i=1;i >u>>v; add(u,v); add(…
```cpp #include using namespace std; int n,m; struct Node { int lazy; // -1: 乱的 0:全是0 1: 全是1 int l,r,sum; // sum: 1的个数 int ls1,rs1,s1; // ls1: 左边连续1的个数 s1: 连续1的…
在讨论《样例过,下载的数据也一模一样,为什么全WA?(Splay+并查集)》回复:
真的发现下载的数据一模一样,用对拍发现是一样的,甚至问了chatgpt也是一样的,那么为什么全WA呢?我甚至还卡了最后一行的回车,还是全WA,不理解 > <
```cpp #include using namespace std; const int N=4e5; struct Node { int son[2],fa,val,sz; }t[N]; int n,m,root[N]; void pushup (int x) { t[x].sz=t[t[x].son[0]].s…
跪求神犇奆佬相助!!!orz ``` #include using namespace std; int n,S,a[500010]; long double sum,ave,x; int main() { // ios_base::sync_with_stdio(false); scanf("%d%d",&n,&S)…
```cpp #include using namespace std; map mp; int n,x,y; int main() { scanf("%d",&n); for (int i=1;i ::iterator it=mp.begin();it!=mp.end();it++) // cout first ::…
```cpp /* 此题不可贪心!!! #include using namespace std; int L,n,k,ans; int a[100010]; priority_queue que; // que.size() 元素数量 // que.push(x) 插入x // que.pop() 删除堆顶元素 //…
```cpp #include #define ll long long using namespace std; const ll N=5e6,INF=114514520606060606; ll T[N],la1[N],la2[N]; ll n,m; inline ll read() { ll x=0,f=1; c…
```cpp #include #define ll long long using namespace std; const int N=2e5+10; int n,m; ll ma[N>>3],ans,mod,k; inline ll max (ll a,ll b) { return (a>b)?a:b; } vo…
在讨论《求救!!!!WA了第十三个点,凑不出HACK数据> <》回复:
已AC,感谢奆佬帮忙发现bug,我是**
大佬求调! ```cpp #include #define ll long long using namespace std; const ll MOD=9901; bool is_prime[100010]; ll prime[100010],t; ll p[100010],s[100010],k,ans=1; ll…
甚至全都开了long long ```cpp #include using namespace std; const long long MOD=666623333; long long prime[1000010],t; long long l,r,ans; bool is_prime[1000010]; long…
所以大佬们能帮忙看看我样例为啥没过咩?我没想明白为啥我第一个样例的结果是-1,我开了dij的剪枝就变成了10,不开剪枝反而变成了-1,不应该剪枝越少越有可能出答案吗? (就是sum+mp[now][i] using namespace std; int n,k,m,s,t,ans=0x3f3f3f3f,tmp[110]…
在讨论《64分求助!!!代码可读性很高!> <》回复:
树的分全对,甚至加强的数据也对了,但是其他的基本都WA了,这是为啥呢
神犇奆佬们棒棒本蒟蒻把,不知道哪里错了 ```cpp #include using namespace std; int n,m; vector mp[5010]; int ans[5010],ok[5010],t; int cir[5010],du[5010],okk[5010],a[5010]; void dfs_…
还手搓了数据,似乎也没啥问题吧?是我对扫雷的理解有问题吗? ```cpp #include using namespace std; int n,m; int mp[1010][1010],ok[1010][1010],ans; int dx[8]={0,0,-1,1,-1,-1,1,1}; int dy[8]={-1…
在讨论《码风优良,为什么会只A了一个点呢?(其他全WA)》回复:
@[keep_of_silence](/user/567247) 第一组数据是yes把?似乎没问题?(1,2,6一组,3,4,5一组)
我还手搓了几个数据,都没啥问题的来着,这个题不让下载数据可还行 ```cpp #include using namespace std; int T,n,k,ans; vector mp[100010]; int ok[100010],okk; int dfs (int ni) { if (okk==-1) retur…
```cpp #include using namespace std; int r,c; char mp[1010][1010]; int dx[4]={0,-1,1,0}; int dy[4]={-1,0,0,1}; int dfs(int x,int y) { mp[x][y]='*'; for (int i=0…
十年OI一场空,不开longlong见祖宗 (被long long卡RE卡了半个小时) (还以为是数组开小了,没想到是这个long long π_π) ```cpp #include using namespace std; long long L,R; bool is_prime[1000010]; int prim…
我看了好多帖子,似乎我的代码都没他们的bug,然后还自己捏了几个数据,都是completely对的(至于官方数据,那个太大了所以找不到bug,还不如自己捏的) 求大佬们看看哪里有bug!!!悬关!!! ```cpp #include using namespace std; int n,q,m; int a[10001…
思路就是从已经给出的目击到的点出发,找到每个相应步数搜索别的点,如果搜到了就标上。剩下的没有被目击的点以及没有标上的点就一一对应,最后一起输出。样例是对的,但是没别的样例了,这为啥全WA呢?(居然没超时,我不理解) ```cpp #include using namespace std; int n,m,r,okk;…
在讨论《全改成long long了,但最后3个点RE,求救!!!!!》回复:
@[zqh123b](/user/587615) 感谢!!!!
在讨论《为什么不能用邻接矩阵呢?》回复:
有个大佬回复我了,举个反例:连了12,连了34,再连23的时候,程序不会把14连起来!!!
```cpp #include using namespace std; bool ok[5010][5010]; int main() { int a,b,n,m,p; scanf("%d%d%d",&n,&m,&p); for (int i=1;i<=n;i++) ok[i][i]=true; for (int i…
求大佬解救!!!我全都改成longlong了,怎么还是最后三个点RE呢? ```cpp //坑了我很久的一个点(搞不懂为什么),我原以为,只要在区间查询的同时下传就好了(平时就存着,只有要求和的时候再下传) //然而神奇的是,只在区间修改、或者只在区间查询的时候下传,都不能求出正解,必须两个函数都要有下传操作,才能求出…
在讨论《下载的样例对但是全WA,是什么问题?》回复:
@[williamwei](/user/700558) 哦哦哦,妙啊,但是不用gets就要彻底改造了> <
```cpp #include #include #include #include using namespace std; char s[60][30]; int n,f,a,b,c,k,ok,ans; int main() { scanf("%d",&n); s[0][0]=getchar(); for (int…