There is a set with size n initially, and there are q operations, each operation will be one of the following cases:
Add x: add x to this set.
Delete: delete the minimum element of the set.
Query: print the minimum element of the set.
10671067
There is a set with size n initially, and there are q operations, each operation will be one of the following cases:
Add x: add x to this set.
Delete: delete the minimum element of the set.
Query: print the minimum element of the set.
The first line will be an integer T, which is the number of test cases. (1 <= T <= 10). For each test case, the first line will be an integer n(1 <= n <= 106), then the second line will be n integers, they make up the initial set. The third line will be an integer q(1 <= q <= 105), it means the number of operations. Then followed by q lines, each line will be one of the following cases:
1 x: Add x.
2: Delete.
3: Query.
For each “Query”, print the minimum element of the set.
1
1
1
1
3
1
We guarantee that all values are less than or equal to 109.