DANNNqwq @ 2023-10-01 13:26:55
我把Splay rotate函数中的
maintain(y);maintain(x);
写成了
maintain(y);maintain(z);
却通过了,rotate函数如下:
void rotate(int x) {
int y=fa[x],z=fa[fa[x]],chk=get(x);
ch[y] [chk]=ch[x] [chk^1];
if(ch[x] [chk^1]) fa[ch[x] [chk^1]]=y;
ch[x] [chk^1]=y;
fa[y]=x;
fa[x]=z;
if(z) ch[z] [y==ch[z] [1]]=x;
maintain(y);maintain(x);
}
希望加强数据 @StudyingFather
还有P3369也是
by DANNNqwq @ 2023-10-01 13:27:29
@StudyingFather
by Special_Tony @ 2023-10-01 13:38:04
@DANNNsth 6
不过数据要你造一个,你造一个能Hack你代码的