wgl2009 @ 2021-04-05 07:40:20
#include<cstdio>
#include<iostream>
#include<algorithm>
using namespace std;
int n,k;
int a[100005];
int main()
{
cin>>n>>k;
for(int i=0;i<n;i++)
{
cin>>a[i];
}
sort(a,a+n);
cout<<a[k-1]<<endl;
return 0;
}
by cancer_3_26 @ 2021-04-13 15:07:58
本题是用来练分治的(可本人用的nth_element......啊)