#include<bits/stdc++.h>
using namespace std
;
const int maxn
=10010;
struct info
{
int teamnum
;
int teamernum
;
int score
;
} t
[maxn
];
int hashtable
[maxn
]={0};
int main(){
int N
;cin
>>N
;
for(int i
=0;i
<N
;i
++)
{
scanf("%d-%d %d",&t
[i
].teamnum
,&t
[i
].teamernum
,&t
[i
].score
);
hashtable
[t
[i
].teamnum
]+=t
[i
].score
;
}
int max
=-1;int temp
;
for(int i
=0;i
<maxn
;i
++){
if(hashtable
[t
[i
].teamnum
]>max
){
max
=hashtable
[t
[i
].teamnum
];
temp
=t
[i
].teamnum
;
}
}
cout
<<temp
<<" "<<max
;
return 0;
}
转载请注明原文地址: https://mac.8miu.com/read-507685.html