Guan_qiqi @ 2020-05-07 23:23:54
#include<bits/stdc++.h>
using namespace std;
int main(){
int n, m;
cin >> n >> m;
long long buf[n];
for(int i=0; i<n; i++){
cin >> buf[i];
}
sort(buf, buf+n);
cout << buf[m];
return 0;
}
by Implicit @ 2020-05-09 21:30:00
@Guan_qiqi 宁是康到了题解?
by Lucifero @ 2020-05-10 22:23:06
@Guan_qiqi 我学过,昨天就是想到了这个才过的
by Guan_qiqi @ 2020-05-11 14:53:12
@LoveMC 嗯,看了题解才知道还有这么个函数
by lichenghan @ 2020-06-19 18:18:13
(我是用了O2+sort+快读)
O2前: 传送门
O2后: 传送门
by shzuaeno @ 2020-08-08 19:15:40
@Guan_qiqi 这题用sort卡不过去的