# HDU 6129 Just do it

/ 0评 / 0

Time Limit: 5000/2500 MS (Java/Others)
There is a nonnegative integer sequence $a_1...n$ of length $n$. HazelFan wants to do a type of transformation called prefix-XOR, which means a1...n changes into b1...n, where bi equals to the $XOR$ value of $a_1,...,a_i$. He will repeat it for $m$ times, please tell him the final sequence.

#### Input

The first line contains a positive integer $T(1≤T≤5)$, denoting the number of test cases.
For each test case:
The first line contains two positive integers $n,m(1≤n≤2×10^5,1≤m≤10^9)$.
The second line contains $n$nonnegative integers $a_1...n$ $(0≤a_i≤2^30−1)$.

#### Output

For each test case:
A single line contains $n$ nonnegative integers, denoting the final sequence.

#### Source

2017 Multi-University Training Contest - Team 7

• 默认
• 护眼
• 夜晚
• Serif
• Sans