Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
319395 张鑫壕 【C5-9】第 K 名 C++ 通过 100 2 MS 260 KB 293 2025-04-26 14:25:25

Tests(10/10):


#include<bits/stdc++.h> using namespace std; struct sgh{ string name; int t; }a[105]; bool cmp(sgh x,sgh 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; }


测评信息: