#include<bits/stdc++.h>
using namespace std;
struct student{
int no;
string name;
double born;
};
int n;
student s;
vector<student> v;
bool cmpBorn(student s1,student s2){
return s1.born >s2.born ;
}
bool cmpNo(student s1,student s2){
return s1.no < s2.no ;
}
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>s.no >>s.name >>s.born ;
v.push_back(s) ;
}
//先排优先级低的,后排优先级高
sort(v.begin(),v.end(),cmpNo);
sort(v.begin(),v.end(),cmpBorn);
for(int i=0;i<v.size();i++){
cout<<v[i].no<<" "<<v[i].name<<" "<<v[i].born<<endl;
}
return 0;
}
没有回复内容