Blind_Struggle @ 2023-07-24 13:26:21
#include <bits/stdc++.h>
using namespace std;
int a[5000005],k;
int main(){
int n;
cin>>n>>k;
for(int i=0;i<n;i++){
cin>>a[i];
}
sort(a,a+n);
cout<<a[k];
}
by chen_z @ 2023-07-24 13:39:30
n<5000000,O(nlogn),超了
by chen_z @ 2023-07-24 13:57:42
可以直接scanf+O2就过了
by Blind_Struggle @ 2023-07-27 23:19:33
@CSQLYB 谢谢大佬!!!