Pro.ID1579 Title普通平衡树 Title链接http://10.20.2.8/oj/exercise/problem?problem_id=1579 AC8 Submit24 Ratio33.33% 时间&空间限制描述这是一道模板题。 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作:
输入多测试用例。 每个测试用例第一行为 n ,表示操作的个数,下面 n 行每行有两个数 opt 和 x ,opt 表示操作的序号(1 ≤ opt ≤ 6 )。 1 ≤ n ≤ 105 , −107 ≤ x ≤ 107 输出Description 这是一道模板题。 您需要写一种数据结构(可参考题目标题),来维护一些数,其中需要提供以下操作:
Input 多测试用例。 每个测试用例第一行为 n ,表示操作的个数,下面 n 行每行有两个数 opt 和 x ,opt 表示操作的序号(1 ≤ opt ≤ 6 )。 1 ≤ n ≤ 105 , −107 ≤ x ≤ 107 Output 每个测试用例,对于操作 3、4、5、6 每行输出一个数,表示对应答案。 然后输出一个空行。 Sample Input 10 Sample Output 106465 Author 样例输入10 样例输出106465 提示作者 |