| Run ID | 作者 | 问题 | 语言 | 测评结果 | 时间 | 内存 | 代码长度 | 提交时间 |
|---|---|---|---|---|---|---|---|---|
| 83425 | sh25_shengmy | 谁考了第k名 | C++ | 解答错误 | 0 MS | 248 KB | 439 | 2026-01-25 22:07:37 |
#include<bits/stdc++.h> using namespace std; struct st{ int hm; double sc; }a[10000]; int main(){ int n,m; cin>>n>>m; double t[n]; for(int i=0;i<n;++i){ cin>>a[i].hm>>a[i].sc; t[i]=a[i].sc; } sort(t,t+n,greater<double>()); int v=t[m-1]; for(int i=0;i<n;++i){ if(a[i].sc==v){ cout<<a[i].hm<<" "<<a[i].sc; break;} } return 0; }