wyxslz @ 2024-07-11 19:37:06
大佬们帮忙看一下
#include<bits/stdc++.h>
using namespace std;
int a[5000005],n,k;
int main(){
cin>>n>>k;
for(int i=0;i<n;i++){
cin>>a[i];
}
sort(a,a+n);
cout<<a[k];
return 0;
}
by qiuribomu @ 2024-07-11 19:41:45
别用cin和cout,时间太长了
by qiuribomu @ 2024-07-11 19:42:59
换成scanf和printf
by meifan666 @ 2024-07-11 19:44:31
@wyxslz cin太慢了,改成scanf即可
求关