F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

Different Sums

Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 249    Accepted Submission(s): 107
Special Judge


Problem Description
A subsum of the sequence is sum of one or more consecutive integers of it. You are given an integer $N$($1\leq N \leq 2000$ ). Your task is to make a sequence of integers which are less than $3(N+ 6)$, such that its all subsums ($N (N +1) / 2$ in total) are different from each other.
 

Input
There are several test cases.

The first line of the input contains an integer $T(1\leq T\leq 200 )$, the number of test cases.

Each of the next $T$ lines contains an integer ,$N$ the length of the sequence.
 

Output
For each test case, print one line with $N$ space separated integers representing your sequence.

If multiple solutions exist, any of them will be accepted.
 

Sample Input
2 2 5
 

Sample Output
1 2 1 2 4 8 16
 

Author
金策工业综合大学(DPRK)
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-05-08 08:46:36, Gzip enabled