好像现在最后一行换行不会PE了
2025-03-16 17:09:24
发布于:江苏
8阅读
0回复
0点赞
#include <bits/stdc++.h>
using namespace std;
struct gjz{
string name;
long long id,bh;
}b[200001];
bool cmp(gjz a,gjz b){
if(a.id!=b.id) return a.id>b.id;
else if(a.bh!=b.bh) return a.bh<b.bh;
else return a.name>b.name;
}
int main(){
int a;
cin>>a;
for(int c=0;c<a;c++){
cin>>b[c].name>>b[c].id>>b[c].bh;
}
sort(b,b+a,cmp);
for(int c=0;c<a;c++){
cout<<b[c].name<<endl;
}
return 0;
}
这里空空如也
有帮助,赞一个