#include<stdio.h>
#define N 1000+10
int main()
{
int a[N] = { 0 };
int n, team, mem, score, i, j, maxt,maxs;
maxt = maxs = 0;
scanf("%d", &n);
for (i = 1; i <= n; i++)
{
scanf("%d-%d %d", &team, &mem, &score);
a[team] += score;
if (a[team] > maxs)
{
maxt = team;
maxs = a[team];
}
}
printf("%d %d\n", maxt, maxs);
system("pause");
return 0;
}
1047
猜你喜欢
转载自blog.csdn.net/zero_1778393206/article/details/79332621
今日推荐
周排行