Algorithm_ZRF @ 2023-07-31 11:44:12
#include <bits/stdc++.h>
using namespace std;
int n, k, a;
priority_queue<int, vector<int>, greater<int>> q;
inline void Judgment() {
for (int i = 0; i < n; ++i) {
if (i == k) {
cout << q.top();
break;
}
q.pop();
}
}
inline void Read() {
cin >> n >> k;
for (int i = 0; i < n; ++i) {
cin >> a;
q.push(a);
}
Judgment();
}
int main() {
Read();
return 0;
}