Qiqi_Hun @ 2023-08-28 10:39:17
#include <bits/stdc++.h>
using namespace std;
#define int long long
int a[5000005],k,n;
signed main()
{
cin>>n>>k;
for(int i=0;i<n;i++) cin>>a[i];
sort(a,a+n);
cout<<a[k];
return 0;
}
by Qiqi_Hun @ 2023-08-28 10:54:46
@ninji dalao我太谢谢你了,已关
by Isharmla @ 2023-08-28 10:55:41
@hunjingqi 因为
by ninji @ 2023-08-28 10:55:46
@hunjingqi 不谢
by ninji @ 2023-08-28 10:56:19
@Isharmla O2优化加卡常能过
by Isharmla @ 2023-08-28 10:59:09
@ninji 这样就没有练习的意义了。
by ninji @ 2023-08-28 11:00:40
@Isharmla 懒得写分治
by wym_2012 @ 2023-09-04 21:18:03
@Argvchs
问题是题目现在不让用了(大悲)