#P1722G. Even-Odd XOR
Even-Odd XOR
No submission language available for this problem.
Description
Given an integer , find any array of distinct nonnegative integers less than such that the bitwise XOR of the elements on odd indices equals the bitwise XOR of the elements on even indices.
The first line of the input contains an integer () — the number of test cases.
Then lines follow, each containing a single integer — the length of the array.
It is guaranteed that the sum of over all test cases does not exceed .
For each test case, output one line containing distinct integers that satisfy the conditions.
If there are multiple answers, you can output any of them.
Input
The first line of the input contains an integer () — the number of test cases.
Then lines follow, each containing a single integer — the length of the array.
It is guaranteed that the sum of over all test cases does not exceed .
Output
For each test case, output one line containing distinct integers that satisfy the conditions.
If there are multiple answers, you can output any of them.
Note
In the first test case the XOR on odd indices is and the XOR on even indices is .