#include<bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int tId, mId, score;
int arr[10005] = {0}, max = -1, maxid;
for (int i = 0; i < n; i++){
scanf("%d-%d %d", &tId, &mId, &score);
arr[tId] += score;
if (arr[tId] > max){
max = arr[tId];
maxid = tId;
}
}
cout << maxid << " " << max;
return 0;
}
PAT/1047 编程团体赛
最新推荐文章于 2024-11-12 21:05:38 发布