#include<bits/stdc++.h>
using namespace std;
const int N=110;
struct node
{
int id;
double score;
}a[N];
bool cmp(node x,node y){
return x.score>y.score;
}
int n,k;
int main()
{
cin>>n>>k;
for(int i=1;i<=n;i++)
{
cin>>a[i].id>>a[i].score;
}
sort(a+1,a+n+1,cmp);
printf("%d",a[k].id);
cout<<" ";
printf("%g",a[k].score);
return 0;
}
1176 谁考了第k名
最新推荐文章于 2024-11-07 23:24:07 发布