0
1
mirror of https://git.sb/baoshuo/OI-codes.git synced 2024-11-05 14:38:48 +00:00
OI-codes/Luogu/P1138/P1138.cpp

22 lines
343 B
C++
Raw Normal View History

2020-09-29 12:52:45 +00:00
// R39029021
#include <bits/stdc++.h>
using namespace std;
int main() {
int n, a[10005], k;
cin >> n >> k;
for (int i = 0; i < n; i++) {
cin >> a[i];
}
sort(a, a + n);
n = unique(a, a + n) - a;
if (k >= n) {
cout << "NO RESULT" << endl;
2021-11-19 09:01:13 +00:00
} else {
2020-09-29 12:52:45 +00:00
cout << a[--k];
}
return 0;
}