#include<stdio.h>
#include<string.h>
struct stut{
char name[12];
char classs[12];
int score;
}stu,mstu,mastu;
int main(){
int N;
scanf("%d",&N);
char a[12];
char b[12];
int c;
int min = 110;
int max = -1;
while(N--){
scanf("%s%s%d",&a,&b,&c);
if(c > max){
max = c;
strcpy(mastu.name,a);
strcpy(mastu.classs,b);
mastu.score = c;
}
if(c < min){
min = c;
strcpy(mstu.name,a);
strcpy(mstu.classs,b);
mstu.score = c;
}
}
printf("%s %s\n",mastu.name,mastu.classs);
printf("%s %s\n",mstu.name,mstu.classs);
return 0;
}
pta 1004成绩
最新推荐文章于 2021-09-21 21:55:05 发布