#include<bits/stdc++.h>
using namespace std; struct student {
int num;
double b;
}; struct student k[1000]; bool cmp(const student&a,const student&c){
return a.b>c.b;
} int main() {
int n,m;
cin>>n>>m;
for(int i=0; i<n; i++) {
cin>>k[i].num>>k[i].b;
}
sort(k,k+n,cmp);
cout<<k[m-1].num<<" "<<k[m-1].b;
return 0;
}
全部回复 共 0 条
还没有人回复。往下写第一条。
发表回复
登录后即可回复本帖,与出题人和同学一起讨论。
登录