#include<iostream>
#include<cstring>
#include<stdio.h>
#include<algorithm>
using namespace std;
struct baoming{
int haoma;
int s;
};
bool cmp(baoming a,baoming b){
if(a.s!=b.s) return a.s>b.s;
else
if(a.haoma!=b.haoma)
return a.haoma<b.haoma;
}
int main(){
int n,m,i,j;
cin >>n>>m;
struct baoming a[n];
for(i=0;i<n;i++)
cin >>a[i].haoma>>a[i].s;
sort(a,a+n,cmp);
m=m*1.5;
for(j=0;j<n;j++){
if(a[j].s<a[m-1].s)
break;
}
cout <<a[m-1].s<<" "<<j<<endl;
for(i=0;i<j;i++)
cout <<a[i].haoma<<" "<<a[i].s<<endl;
}
noi分数线划定
最新推荐文章于 2022-03-04 16:53:04 发布