#include<bits/stdc++.h>
using namespace std;
typedef pair<int,int> point;
typedef struct{
int id;
point score;
}cow;
cow po[50000];
bool cmp1(cow a,cow b){
return a.score.first<b.score.first;
}
bool cmp2(cow a,cow b){
return a.score.second<b.score.second;
}
int main(){
int n,m;
cin>>n>>m;
for(int i=0;i<n;i++){
po[i].id=i+1;
cin>>po[i].score.first>>po[i].score.second;
}
sort(po,po+n,cmp1);
sort(po+n-m,po+n,cmp2);
cout<<po[n-1].id;
return 0;
}
奶牛的选举
最新推荐文章于 2025-12-05 14:37:41 发布
792

被折叠的 条评论
为什么被折叠?



