Run ID 作者 问题 语言 测评结果 分数 时间 内存 代码长度 提交时间
436378 方相宜 【C5-9】第 K 名 C++ 通过 100 2 MS 260 KB 331 2026-04-12 20:13:06

Tests(10/10):


#include<bits/stdc++.h> using namespace std; struct hsg{ string a; long long b; }; bool cmp(const hsg& x,const hsg& y){ return x.b<y.b; } int main(){ hsg arr[106]; int n,q; cin>>n>>q; for(int i=1;i<=n;i++){ cin>>arr[i].a>>arr[i].b; } sort(arr+1,arr+n+1,cmp); cout<<arr[q].a<<endl; return 0; }


测评信息: