heyZZZ @ 2024-02-01 08:33:24
#include<bits/stdc++.h>
using namespace std;
int n;
struct oi{
string s;
int n,y,r,h;
}a[101];
bool cmp(oi a,oi b){
if(a.n==b.n&&a.y==b.y&&a.r==b.r) return a.h>b.h;
if(a.n==b.n&&a.y==b.y) return a.r>b.r;
if(a.n==b.n) return a.y>b.y;
return a.n>b.n;
}
int main(){
cin>>n;
for(int i=1;i<=n;i++){
cin>>a[i].s>>a[i].n>>a[i].y>>a[i].r;
a[i].h=i;
}
sort(a+1,a+n+1,cmp);
for(int i=n;i>=1;i--) cout<<a[i].s<<endl;
return 0;
}
by jinglinbankemeng @ 2024-02-01 08:38:53
看私信!
by heyZZZ @ 2024-02-01 08:50:25
题目写错了!!
应该是64分。