题号:NC223885
时间限制:C/C++/Rust/Pascal 3秒,其他语言6秒
空间限制:C/C++/Rust/Pascal 64 M,其他语言128 M
64bit IO Format: %lld
题目描述
Kuriyama Mirai gives you an integer sequence of

integers

.
She will ask you to design an appropriate data structure,in order to maintain the sequence,allowing her to perform

operations on it.
Those

operations have two types:
-
- this operation assigns every
which satisfies
to
, in which the operator means "bitwise xor" or "bitwise exclusive or"
-
- this operation assigns every
which satisfies
to
,in
which the operator

means "bitwise xor", or "bitwise exclusive or".
By the time those

operations have been performed, she will query the whole adjusted
sequence

,, you will need to output the value of every single ai which satisfies

.。
输入描述:
The first line contains two integers
)
.
The second line contains

integers
)
.
The next

lines describe operations, the i-th line describes the i-th operation in one of these two
formats:

- representing an operation of the zeroth type.

- representing an operation of the first type.
Additionally, it is guaranteed that for any operation of the zeroth type,

; and that for any operation of the first type,
%5Clt%202%5E%7B30%7D)
输出描述:
The only line contains

integers

namely the adjusted integer sequence.
示例1
输入
复制
5 3
11 11 0 8 5
0 1 5 3
1 2 5 5
1 1 2 14
示例2
输入
复制
8 10
47777 11793 27829 32707 8865 6172 63004 7141
1 1 4 24065
1 4 5 34063
1 3 3 60083
0 7 8 3034
1 1 6 14104
1 2 6 46221
1 5 6 36340
1 8 8 18263
0 7 8 10538
1 6 8 56417
输出
复制
54200 62343 23441 10076 43465 51716 2190 41505
备注: