Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
436375 方相宜 【C5-9】病人排队 C++ 运行出错 0 1995 MS 296 KB 450 2026-04-12 19:57:42

Tests(0/10):


#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[1005]; 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; }


测评信息: