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

Tests(10/10):


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


测评信息: