ZOJ Monthly, June 2018.A.Peer Review

There are  students involved in a peer review about their course projects. Each student has to score the other  students' projects separately. The score given must be an integer ranging from 0 to 100 (both inclusive), and the final score of a student is the sum of the scores his project receives.

But these students are on bad terms with each other, so they all want to minimize the sum of the final scores of the other students, and maximize his/her own final score when the first condition is satisfied.

If every student uses the best strategy, can you predict their final scores?

Input

There are multiple test cases. The first line of the input contains an integer  (about 100), indicating the number of test cases. For each test case:

The first and only line contains one integer  (), indicating the number of students involved in the peer review.

Output

For each test case output one line containing  integers separated by one space, indicating the final scores of each student. You should print the answer in non-descending order.

Please, DO NOT output extra spaces at the end of each line, or your answer may be considered incorrect!

Sample Input

1
2

Sample Output

0 0

#include<iostream>
using namespace std;
int main()
{
    int T,n;
    cin>>T;
    while(T--&&cin>>n){
        for(int i=0;i<n-1;i++)
            cout<<0<<' ';
        cout<<0<<endl;
    }
}




扫描二维码关注公众号,回复: 1949616 查看本文章

猜你喜欢

转载自blog.csdn.net/xxxxxm1/article/details/80642075