目前在使用大眼观察法调试中
by Pittow @ 2022-02-26 09:35:42
@[Yeegle](/user/128178) 不开 LL 见祖宗
by dingshengyang @ 2022-02-26 09:41:48
@[dingshengyang](/user/302394) 开了仍然没有用
by Pittow @ 2022-02-26 09:43:39
~~frepen算吗~~
by TLE_Forever @ 2022-02-26 09:49:23
@[TLE_Forever](/user/286238) ~~调试完最后交上去的时候加错了~~
by TLE_Forever @ 2022-02-26 09:50:16
直接眼调千行代码,您
by XING_ginkiha @ 2022-02-26 10:04:42
```cpp
for(int i=1;i<=n;i++){
char opt;cin>>opt;
long long k=read();
if(opt=='I'&&k>=mmin)insert(k-laz);
else if(opt=='F')printf("%lld\n",kth(rt,(int)k));
else if(opt=='A')laz+=k;
else laz-=k,erase();
}
```
`if(opt=='I'&&k>=mmin)` 和 `else laz-=k,erase();`,这种低级错误调了一晚上qwq
by Imiya @ 2022-03-01 21:51:02
活捉
by Rnfmabj @ 2022-03-22 10:54:20
insert()里:
```cpp
if (ro == 0)
{
cont++;
val[cont] = x;
cnt[cont]++;
fa[cont] = f;
son[f][get(cont)] = cont;
update(f);
update(cont);
splay(cont);
return;
}
if (val[ro] == x)
{
cnt[ro]++;
update(f);
update(ro);
splay(ro);
return;
}
```
两个分支写反了,一加入0就会将root置为0,然后输出的就一直是-1
by 童年的小翼龙 @ 2022-11-19 19:37:36