RT。
void erase(int x){ int L = pre(x); int R = succ(x); splay(L,0); splay(R,L); if(tr[R].s[0] == 0)return; if(--tr[tr[R].s[0]].cnt == 0)tr[R].s[0] = 0; else splay(tr[R].s[0],0); }
删完了一定把这东西 splay 上去,否则 WA 60pts。
splay