刚刚这题我改了一个地方
int findroot(int x){
access(x);
splay(x);
while(ch[x][0]){
push_down(x);
x=ch[x][0];
}
splay(x);
return x;
}
int findroot(int x){
access(x);
splay(x);
while(ch[x][0]){
push_down(x);
x=ch[x][0];
}
//splay(x);
return x;
}
就从10分到100分了?
为什么,我之前看日报还专门强调过这里要splay一下。
求助