#include<stdio.h>
int main(){
int n,team,memb,score,list[1001]={};
scanf("%d",&n);
while(n--){
scanf("%d-%d %d",&team,&memb,&score);
list[team]+=score;
}
team=0;
score=0;
for(int i=1;i<=1000;i++){
if(list[i]>score){
score=list[i];
team=i;
}
}
printf("%d %d",team,score);
return 0;
}
PAT(Basic Level)_1047_编程团体赛
最新推荐文章于 2023-06-27 14:29:34 发布