windf @ 2022-09-13 14:52:22
while(m--){
read(opt),read(x);
x^=last;
switch(opt){
case 1:insert(rt,x);break;
case 2:del(rt,x);break;
case 3:insert(rt,x);last=get_rank(rt,x)-1;del(rt,x);break;//看这里,先插入后删除
case 4:last=get_val(rt,x+1);break;
case 5:last=get_pre(x);break;
case 6:last=get_next(x);break;
}
if(opt>2)ans^=last;
}
by huihui_qwq @ 2022-09-13 15:40:58
板子不是正解吧,所以这算tlqtj(?
by ADay @ 2022-09-13 15:45:03
@huihui_qwq 当然不算
by huihui_qwq @ 2022-09-13 15:48:23
@ADay oh