407675: GYM102870 E Encryption of Orz Pandas
Description
An Orz Panda agent has some data which should be encrypted. He has store the data into a list a with length n. To encrypt it, he'll run the following loop (wrote in Python) for $$$k$$$ times:
for i in range(1, n):
a[i] ^= a[i-1]
Please output the content of the list a after the encryption.
InputThere is only one test case in the input file.
The first line contains two integers $$$n$$$ and $$$k$$$, seperated by a whitespace.
The second line contains $$$n$$$ integers $$$a_0, a_1, \cdots, a_{n-1}$$$, the elements in the list a. Each adjacent pair of integers are seperated by a whitespace.
It's guaranteed that $$$1 \leq n \leq 10^5$$$, $$$0 \leq a_i < 2^{17}$$$, and $$$1 \leq k \leq 10^{18}$$$.
OutputOutput one line, containing $$$n$$$ integers in the encrypted list a. Each adjacent pair of integers should be seperated by a whitespace. There should be no trailing whitespaces.
ExampleInput6 5 1 0 5 1 5 5Output
1 1 4 5 1 4Note
For the example:
- The list should become [1,1,4,5,0,5] after the first iteration
- The list should become [1,0,4,1,1,4] after the second iteration
- The list should become [1,1,5,4,5,1] after the third iteration
- The list should become [1,0,5,1,4,5] after the fourth iteration
- The list should become [1,1,4,5,1,4] after the fifth iteration, and you should output it