挖掘机技术哪家强


#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;
}
上一篇:MySql备份工具MySqldump


下一篇:@Autowired、@Resource、和@Service注解详解