Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
319372 王栎州 【C5-9】第 K 名 C++ 通过 100 6 MS 256 KB 320 2025-04-26 14:21:04

Tests(10/10):


#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; }


测评信息: