#include<stdio.h>
#include<string.h>
#define MAXN 100001
int main()
{
int n, schID, score;
scanf("%d", &n);
int school[MAXN];
memset(school, 0, sizeof(school));
for(int i = 0; i < n; i ++)
{
scanf("%d %d", &schID, &score);
school[schID] += score;
}
int MaxschID = 1, Max = -1;
for(int i = 1; i <= n; i ++)
if(Max < school[i])
{
Max = school[i];
MaxschID = i;
}
printf("%d %d\n", MaxschID, Max);
return 0;
}
相关文章
- 12-26BI工具数据可视化效果哪家强?我选这款!
- 12-26PAT_B_1032 挖掘机技术哪家强 (20 分)【最后一个测试点超时:系统bug】
- 12-26ccf---挖掘机技术哪家强
- 12-26学图像处理技术,新秀Affinity Photo与Photoshop比哪家强?
- 12-26PTA basic 1032 挖掘机技术哪家强 (20 分) c语言实现(gcc)
- 12-26【JZOJ 3858】【NOIP2014八校联考第3场第2试10.5】挖掘机技术哪家强
- 12-26PAT乙级 1032. 挖掘机技术哪家强(20)
- 12-26PAT-乙级-1032. 挖掘机技术哪家强(20)
- 12-26PAT (Basic Level) Practise:1032. 挖掘机技术哪家强
- 12-26双十一 大促 云服务器 哪家强(价格最低)