题解
2025-07-07 15:05:13
发布于:浙江
0阅读
0回复
0点赞
#include<iostream>
#include<algorithm>
using namespace std;
typedef struct _{
string name;
int f,k;
bool operator<(const _& other) const{
if (f!=other.f) return f>other.f;
if (f==other.f && k==other.k) return name<other.name;
return k>other.k;
}
}info;
int main(void){
int n;
_ a[100010];
cin>>n;
for (int i=0;i<n;i++){
string n;
int b,c;
cin>>n>>b>>c;
if (b>=60 && c>=60)
a[i].name=n,a[i].f=b,a[i].k=c;
}
sort(a,a+n);
for (int i=0;i<n;i++) cout<<a[i].name<<endl;
return 0;
}
这里空空如也
有帮助,赞一个