懒得再开一页,数组版Splay的代码也在此给出
```cpp
void erase(int x)
{
int pre=prev(x),nxt=next(x);
splay(pre);
splay(nxt,pre);
int t=ch[nxt][0];
if(cnt[t]>1)
{
cnt[t]--;
splay(t);
}
else ch[nxt][0]=0;
}
```
by Smile_Cindy @ 2020-02-11 15:16:59