#include<stdio.h>
int main()
{
int teamNum, memberNum, result = 0;
int a [100000]={0};
int max = 0;
int n,i;
scanf("%d",&n);
for(i=0;i<n;i++)
{
scanf("%d-%d%d",&teamNum,&memberNum,&result);
a[teamNum] += result;
if(a[teamNum] > a[max])
max = teamNum;
}
printf("%d %d",max, a[max]);
return 0;
}
网友评论