#P10369. 「LAOI-4」Mex Tower (Easy ver.)
「LAOI-4」Mex Tower (Easy ver.)
Background
The difference between this problem and the Hard Version is that this problem requires you to output a valid construction.
Problem Description
Define as the smallest natural number that does not appear in the set . For example, and .
Next, we define one operation on a natural number sequence as replacing sequence with a sequence of length , where .
You need to construct a natural number sequence of length , satisfying , and then perform operations on it. Obviously, in the end the sequence will have only one number left, and you need to maximize the value of this number.
If there are multiple possible sequences, you may output any valid construction.
Input Format
This problem contains multiple test cases.
The first line contains a positive integer , the number of test cases.
For each test case, there is only one line containing a positive integer .
Output Format
For each test case, output one line with integers, representing the sequence you constructed.
3
2
5
7
0 1
3 1 5 0 1
0 7 9 4 0 0 4
Hint
Sample Explanation
For , after applying the operation to , we will clearly get . It can be proven that this is the maximum answer we can obtain.
Other valid outputs such as can also work.
For and , we cannot give you a clear answer for now.
Constraints
"This problem uses bundled tests"
| Special Property | Total Score | ||
|---|---|---|---|
| None | |||
| None | |||
Special property : it is guaranteed that .
Special property : it is guaranteed that .
For all testdata, it is guaranteed that , , and .
Translated by ChatGPT 5