LaoXu666 @ 2021-08-11 22:13:56
#include<bits/stdc++.h>
using namespace std;
int m[5000005];//防爆栈
int main(){
int n,k;
cin>>n>>k;
for(int i=0;i<n;i++){
//cin>>m[i];//慢读
scanf("%d",&m[i]);//快读更香
}
sort(m,m+n);
//nth_element(m,m[k],m+n);//很快的nth_element
//cout<<m[k];//一个数,用慢写就可以了
printf("%d",m[k]);//快写更香
}
by Chancylaser @ 2021-08-11 22:16:26
@老徐666666 建议看一下sunzz3183的二分代码,这题目卡常啊,nln过不了
by liuzimingc @ 2021-08-11 22:24:41
@Chase_future 过得了