本题无难度,主要掌握使用scanf输入符号"-"的方法
#include<iostream>
using namespace std;
int main()
{
int N;
int team, mem, score;
int s[1001] = { 0 };
cin >> N;
for (int i = 1; i <= N; i++)
{
scanf("%d-%d %d", &team, &mem, &score);
s[team] += score;
}
int max = 0;
for (int i = 0; i < 1001; i++)
{
if (s[max]<s[i])
{
max = i;
}
}
cout << max << " " << s[max] << endl;
return 0;
}