P1923超时求优化

学术版

要用二分
by Moco_jof @ 2024-10-13 13:47:36


哦,我手写的
by Moco_jof @ 2024-10-13 13:50:58


```cpp #include<bits/stdc++.h> using namespace std; int main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0); long long a,b,c[1000000005]; cin>>a>>b; for(int i=1 ; i<=a ; i++){ cin>>c[i]; } sort(c,c+a+1); cout<<c[b+1]; return 0; } ```
by Moco_jof @ 2024-10-13 13:51:24


关闭一下输出流能AC
by Moco_jof @ 2024-10-13 13:51:55


或者你用scanf和printf
by Moco_jof @ 2024-10-13 13:52:43


或者用快读快写
by Moco_jof @ 2024-10-13 13:53:16


@[Moco_jof](/user/1204055) ok谢谢
by Cu_lly888_6_5_A6 @ 2024-10-13 18:55:27


|