#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
最新推荐文章于 2024-12-01 20:53:18 发布