ACINE @ 2018-09-04 17:22:33
inline void splay(int x,int goal)//将x节点旋转到以goal为父亲的节点
{
while(fa[x]!=goal)
{
int y=fa[x],z=fa[y];
if(z!=goal) (son[z][1]==y)^(son[z][1]==x)?rotate(x):rotate(y);
rotate(x);
}
if(!goal) root=x;
}
by Mirach @ 2018-09-04 17:25:28
by MiddleTwo @ 2018-09-04 17:35:34
@ACINE
by wxy_god @ 2018-09-04 18:01:11
slay
by colazcy @ 2018-09-08 13:13:08
@hierarch Splay把s去掉,滑稽
by 142857cs @ 2018-09-21 21:45:42
asply,滑稽