F.A.Qs | Home | ProblemSet | Status | Ranklist | Contest | Login | Register |
---|
Problem 3224 >> 我的Splay哪里错了 |
2730052770 @ 2018-06-09 22:04:41
你先把文本格式弄得好看一点再说
|
kjy @ 2018-06-09 22:08:21
不用了,已解决。
谢谢大犇2730052770 的回复 |
kjy @ 2018-06-09 22:18:57
我想问一下splay的
inline void rotate(int ro) { int old=tree[ro].fa,oldf=tree[old].fa,whichx=get(ro); tree[old].ch[whichx]=tree[ro].ch[whichx^1]; tree[tree[old].ch[whichx]].fa=old; tree[ro].ch[whichx^1]=old; tree[old].fa=ro; tree[ro].fa=oldf; if (oldf)tree[oldf].ch[tree[oldf].ch[1]==old]=ro; update(old); update(ro); } tree[tree[old].ch[whichx]].fa=old;这句话有什么用 |