题解
2025-03-15 17:41:33
发布于:江苏
14阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
struct node{
string name;
int w , r , j , z;
}a[200005];
bool cmp(node a , node b){
if(a.w != b.w) return a.w>b.w;
else if(a.r != b.r) return a.r>b.r;
else if(a.j != b.j) return a.j>b.j;
else return a.z<b.z;
}
int main(){
int n , idx = 0;
cin>>n;
for(int i=0;i<n;i++){
string s;
int b,c,d;
cin>>s>>b>>c>>d;
if(b>200) cout<<s<<endl;
else{
a[idx].name = s;
a[idx].w = b;
a[idx].r = c;
a[idx].j = d;
a[idx].z = idx;
idx++;
}
}
sort(a,a+idx,cmp);
for(int i=0;i<idx;i++) cout<<a[i].name<<endl;
return 0;
}
这里空空如也
有帮助,赞一个