#include <iostream>
using namespace std;
int n;
struct Student{
string name;
string num;
int goal;
};
int main()
{
Student highest,lowest;
int max=0,min=100;
Student tmp;
cin>>n;
for(int i=0;i<n;i++){
cin>>tmp.name>>tmp.num>>tmp.goal;
if(tmp.goal>max){
highest=tmp;
max=tmp.goal;
}
if(tmp.goal<min){
lowest=tmp;
min=tmp.goal;
}
}
cout<<highest.name<<" "<<highest.num<<endl;
cout<<lowest.name<<" "<<lowest.num<<endl;
return 0;
}
PATB 1004 成绩排名
最新推荐文章于 2023-03-17 17:58:59 发布