EDqwq @ 2021-01-26 15:26:52
int find(int x){
int now = rt,ans = 0;
while (1){
if (x < w[now]){
now = son[now][0];
continue;
}
ans += size[son[now][0]];
if (x == w[now]){
splay(now);
return ans + 1;
}
ans += num[now];
now = son[now][1];
}
}
by 传奇英雄 @ 2021-01-26 16:45:57
萌新?Fake!
by 传奇英雄 @ 2021-01-26 16:46:48
Don't Fake!