这是一道模板题。
您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作:
第一行为 n ,表示操作的个数,下面 n 行每行有两个数 opt 和 x,opt 表示操作的序号(1≤opt≤6)。
对于操作 3、4、5、6 每行输出一个数,表示对应答案。
10 1 106465 4 1 1 317721 1 460929 1 644985 1 84185 1 89851 6 81968 1 492737 5 493598
\n · \n · \n · \n · \n · \n · \n · \n · \n · \n · \n
106465 84185 492737
\n \n \n
1≤n≤105,−107≤x≤107