Run ID | 作者 | 问题 | 语言 | 测评结果 | 分数 | 时间 | 内存 | 代码长度 | 提交时间 |
---|---|---|---|---|---|---|---|---|---|
319519 | 钱凯 | 【C5-9】开锁 | C++ | 解答错误 | 0 | 1 MS | 264 KB | 287 | 2025-04-26 19:35:23 |
#include <bits/stdc++.h> using namespace std; struct Per{ string name; int t; }a[105]; bool cmp(Per x,Per 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; }