题解
2024-02-24 19:59:56
发布于:广东
7阅读
0回复
0点赞
#include<bits/stdc++.h>
using namespace std;
struct good{
string s;
int f,k ;
}g[100005];
bool cmp(good a,good b){
if (a.f != b.f) return a.f > b.f;
else if (a.k != b.k) return a.k > b.k;
return a.s < b.s;
}
int main(){
int n;
cin >> n;
for(int i=1;i<=n;i++){
cin >> g[i].s >> g[i].f >> g[i].k;
}
sort(g+1,g+n+1,cmp);
for(int j=1;j<=n;j++){
if (g[j].f>=60 && g[j].k>=60) cout << g[j].s << endl;
}
return 0;
}
这里空空如也
有帮助,赞一个