#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
int main() {
ios_base::sync_with_stdio(false);
int N, A;
cin >> N>>A;
vector<long long int>v(N);
for(int i=0; i<N; i++){
long long int number;
cin >> number;
v[i] = number;
}
sort(v.begin(), v.end());
cout << v[A-1];
}
'Algorithm ๐ง๐ปโ๐ป > ๋ฐฑ์ค(BOJ)' ์นดํ ๊ณ ๋ฆฌ์ ๋ค๋ฅธ ๊ธ
[๋ฐฑ์ค,c++] 11023๋ฒ - ๋ํ๊ธฐ 3 (0) | 2021.10.26 |
---|---|
[๋ฐฑ์ค,c++] 11022๋ฒ - A+B-8 (0) | 2021.10.26 |
[๋ฐฑ์ค,c++] 11021๋ฒ - A+B-7 (0) | 2021.10.26 |
[๋ฐฑ์ค,c++] 1100๋ฒ - ํ์ ์นธ (0) | 2021.10.26 |
[๋ฐฑ์ค,c++] 10989๋ฒ - ์ ์ ๋ ฌํ๊ธฐ3 (0) | 2021.10.26 |
[๋ฐฑ์ค,c++] 10988๋ฒ - ํฐ๋ฆฐ๋๋กญ์ธ์ง ํ์ธํ๊ธฐ (0) | 2021.10.26 |
๋๊ธ