1.题目
There are n students involved in a peer review about their course projects. Each student has to score the other (n-1) 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?
大意:n名学生要互相评分,可以打[0,100]分。每人都想让别人尽可能低分而自己高分。现有多组数据,每组给出人数n,请输出各个学生的得分(他人给自己的评分之和)。
2.答案
#include<iostream>
#include<cstdio>
using namespace std;
int main(){
int T,n;
scanf("%d",&T);
while(T--){
scanf("%d",&n);
for(int i=1;i<=n;i++){
printf("0");
if(i!=n) printf(" ");
}
printf("\n");
}
return 0;
}
这个故事告诉我们:人类为什么要互相伤害?