#P10306. 「Cfz Round 2」How to Prove
「Cfz Round 2」How to Prove
Problem Description
Given a positive integer .
We define that for a set , is the set consisting of the sums of elements of all non-empty subsets of .
Formally, $\Omega(S)=\{x\mid x=\sum\limits_{i\in T}i,T\subseteq S,T\neq \varnothing\}$.
For example, when , .
You need to construct a set of size such that:
- All elements in are integers not greater than and not less than .
- is minimized, i.e., contains as few elements as possible.
Input Format
This problem has multiple test cases.
The first line contains an integer , representing the number of test cases.
Then each test case is given as follows. For each test case, one line contains a positive integer .
Output Format
For each test case, output one line with integers, representing all elements in the set you constructed.
Any output that satisfies the requirements will be accepted.
3
1
2
4
3
0 5
2 0 -2 4
Hint
"Sample Explanation #1"
For the st test case, , . Of course, , , etc. are also valid sets .
For the nd test case, , .
For the rd test case, , .
It can be proven that the above constructions all satisfy the requirements.
Constraints
Let denote the sum of within a single test case file.
For all testdata, , , .
You can get the score for this problem only if you pass all test cases.
Translated by ChatGPT 5