|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|3 초||512 MB||0||0||0||0.000%|
Eddy, who calls himself ”The Jet-Black Wings”, is fighting against an evil organization called Dark Reunion. Then, he startled from the dream.
“I must be more powerful.” Eddy said to himself in his mind.
Eddy often practice to be a powerful fighter. During his practice, he collects N magic stones. The i-th stone contains Ai units of dark forces. Eddy does the instruction for Q turns, each turn he has two choices:
Could you help Eddy to check whether he is correct?
Expression x ⊕ y means applying bitwise exclusive or operation to integers x and y. The given operation exists in all modern programming languages, for example, in languages C++ and Java it is represented as “ˆ”, in Pascal —as “xor”.
On the first line there is a single integer T indicating the number of test cases.
The first line of each test case contains two integers N, Q, indicating the number of magic stones and the number of instructions.
The second line of each test case contains N integers A1, A2, . . . , AN , indicating the dark forces of the i-th magic stone.
For the following Q lines, each line contains an instruction “1 X” or “2 K”.
You may assume:
For each “2 K” instruction, sum up the dark forces of the first K magic stones after sorted and output in one line.
1 3 6 4 8 3 1 3 1 1 2 3 1 2 2 2 2 1
17 7 3