Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
319368 | 王栎州 | 【C5-9】第 K 名 | C++ | 通过 | 100 | 3 MS | 264 KB | 320 | 2025-04-26 14:19:57 |
#include<bits/stdc++.h> using namespace std; struct sb{ string name; int t; }a[105]; bool cmp(sb x, sb y){ return x.t<y.t; } int main(){ int n,k; cin>>n>>k; for(int i=0; i<n; i++){ cin>>a[i].name>>a[i].t; } sort(a,a+n,cmp); cout<<a[k-1].name; return 0; }