| Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|---|
| 436376 | 方相宜 | 【C5-9】病人排队 | C++ | 运行出错 | 0 | 2002 MS | 39320 KB | 453 | 2026-04-12 19:58:30 |
#include<bits/stdc++.h> using namespace std; struct hsg{ string a; long long b; }; bool cmp(const hsg& x,const hsg& y){ bool x_old=(x.b>=60); bool y_old=(y.b<=60); if(x_old!=y_old) return x_old; if(x.b!=x.b) return x.b>y.b; } int main(){ hsg arr[1000086]; int n; cin>>n; for(int i=1;i<=n;i++){ cin>>arr[i].a>>arr[i].b; } sort(arr+1,arr+n+1,cmp); for(int i=1;i<=n;i++){ cout<<arr[i].a<<endl; } return 0; }