Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
321402 陈信宇 【C5-9】病人排队 C++ 运行出错 0 1 MS 252 KB 432 2025-05-10 13:40:07

Tests(0/10):


#include<bits/stdc++.h> using namespace std; struct pe{ int h; string s; int t; }a[110]; bool cmp(pe x,pe y){ if(x.h>=60&&y.h>=60){ if(x.h!=y.h) return x.h>y.h; return x.t<y.t; } } int main(){ int n; cin>>n; for(int i=1;i<=n;i++){ cin>>a[i].s>>a[i].h; a[i].t=i; } sort(a+1,a+n+1,cmp) ; for(int i=1;i<=n;i++){ cout<<a[i].s<<endl; } return 0; }


测评信息: