Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
328763 钱凯 【C5-9】病人排队 C++ 解答错误 0 50 MS 39316 KB 344 2025-07-07 14:53:38

Tests(0/10):


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


测评信息: