yu_tong @ 2020-05-15 15:34:47
cin,cout过不了,读写速度太慢
by disangan233 @ 2020-05-15 15:41:26
@yu_tong 能过的。
#include<iostream>
#include<algorithm>
using namespace std;
int n,k,a[5000005];
int main()
{
ios::sync_with_stdio(0);
cin>>n>>k;
for(int x,i=1;i<=n;i++) cin>>a[i];
nth_element(a+1,a+k+1,a+n+1);
cout<<a[k+1];
}
by 已注销%Jm9VScx @ 2020-05-15 15:44:03
快读了解一下?
by 傅天宇 @ 2020-05-15 15:45:50
@yu_tong 谢谢提醒——来自此题最优解rank4的蒟蒻。/kk
by SKYFISHzzZ @ 2020-05-15 15:49:06
@唯有呵呵 我仿佛看到了恶意提交可还行
by 傅天宇 @ 2020-05-15 15:50:19
hhh,别人代码 你的代码
by SKYFISHzzZ @ 2020-05-15 16:07:45
我同学T了个点帮忙看下,还被我改炸了(问就是我菜)QAQ
by hanzhongtlx @ 2020-05-15 16:19:39
wee
by 就皮这一下 @ 2020-05-15 16:28:52
@zycany 裸的 sort
会炸,但是用nth_elememt
稳稳的
by kradcigam @ 2020-05-15 16:40:24
zyx
by houpingze @ 2020-05-15 16:52:51
OK~