시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
---|---|---|---|---|---|
1 초 | 256 MB | 43 | 12 | 10 | 29.412% |
A subsum of a sequence is a sum of one or more consecutive elements of this sequence.
You are given an integer $N$. Your task is to make a sequence of positive integers which are not greater than $3 \cdot (N + 6)$ such that all its $N \cdot (N + 1) / 2$ subsums are different from each other.
There are several test cases.
The first line of input contains an integer $T$, the number of test cases ($1 \leq T \leq 200$).
Each of the next $T$ lines contains an integer $N$, the length of the sequence ($1 \le N \le 2000$).
For each test case, print one line with $N$ space-separated positive integers representing your sequence.
If multiple solutions exist, any of them will be accepted.
2 2 5
1 2 1 2 4 8 16