时间限制:C/C++/Rust/Pascal 3秒,其他语言6秒
空间限制:C/C++/Rust/Pascal 1024 M,其他语言2048 M
64bit IO Format: %lld
题目描述
Given a sequence of integers

, you need to process

operations.
In an operation

, you need to update the sequence first, and then query how many different values are there in

.
When

, the update is sort

according to ascending order, or the update is sort

according to descending order.

输入描述:
The first line contains two integers
.
The next line contains
integers
.
For the next
lines, each line contains three integers
, means an operation
. Where
is bitwise XOR, and
is the answer to the last operation (especially,
for the first operation).
输出描述:
For each operation, output an integer in a line representing the answer.
示例1
输入
复制
9 7
2 2 8 8 2 8 2 1 3
2 2 2
3 7 6
6 7 1
9 6 7
10 11 10
7 0 5
5 1 7