创建于 2026/07/18 · 更新于 2026/07/18
You are given an integer .
Your task is to construct a sequence of positive integers such that for every segment , there exists an index with satisfying .
In other words, every segment must contain an element which is strictly greater than half of the sum of this segment.
Additionally, every element of the sequence must not exceed .
It can be proven that under the given constraints, a valid sequence always exists.
The first line contains one integer (), denoting the number of test cases.
Each test case contains one integer ().
It is guaranteed that the sum of over all test cases does not exceed .
For each test case, output integers .
The sequence must satisfy for every .
For every segment , there must exist an index with such that .
If there are multiple valid answers, you may output any of them.
3
1
2
5
1
2 1
1 3 1 7 1