Skip to content

Commit 3d632f2

Browse files
authored
Create [07]_2.cpp
1 parent c7e6c1c commit 3d632f2

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

Solutions/[07]_2.cpp

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
#include <bits/stdc++.h>
2+
3+
using namespace std;
4+
5+
int n, k;
6+
vector<int> data;
7+
8+
int main() {
9+
cin >> n >> k;
10+
for (int i = 0; i < n; i++) {
11+
int x;
12+
scanf("%d", &x); // scanf()로 빠르게 입력
13+
data.push_back(x);
14+
}
15+
sort(data.begin(), data.end());
16+
cout << data[k - 1];
17+
}

0 commit comments

Comments
 (0)