#D12958. Set: Range Search
Set: Range Search
Set: Range Search
For a set of integers, perform a sequence of the following operations. Note that each value in must be unique.
- insert(): Insert to and report the number of elements in after the operation.
- find(): Report the number of in (0 or 1).
- delete(): Delete from .
- dump(, ): Print elements in such that .
Constraints
- The total number of elements printed by dump operations does not exceed
Input
The input is given in the following format.
:
Each query is given by
0
or
1
or
2
or
3
where the first digits 0, 1, 2 and 3 represent insert, find, delete and dump operations respectively.
Output
For each insert operation, print the number of elements in . For each find operation, print the number of specified elements in . For each dump operation, print the corresponding elements in ascending order. Print an element in a line.
Example
Input
9 0 1 0 2 0 3 2 2 1 1 1 2 1 3 0 4 3 2 4
Output
1 2 3 1 0 1 3 3 4
inputFormat
Input
The input is given in the following format.
:
Each query is given by
0
or
1
or
2
or
3
where the first digits 0, 1, 2 and 3 represent insert, find, delete and dump operations respectively.
outputFormat
Output
For each insert operation, print the number of elements in . For each find operation, print the number of specified elements in . For each dump operation, print the corresponding elements in ascending order. Print an element in a line.
Example
Input
9 0 1 0 2 0 3 2 2 1 1 1 2 1 3 0 4 3 2 4
Output
1 2 3 1 0 1 3 3 4
样例
9
0 1
0 2
0 3
2 2
1 1
1 2
1 3
0 4
3 2 4
1
2
3
1
0
1
3
3
4
</p>