We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b4b254f commit 4fcee6cCopy full SHA for 4fcee6c
solutions/beecrowd/2381/2381.cpp
@@ -0,0 +1,23 @@
1
+#include <algorithm>
2
+#include <cstdint>
3
+#include <iostream>
4
+#include <string>
5
+
6
+int main() {
7
+ std::ios_base::sync_with_stdio(false);
8
+ std::cin.tie(0);
9
10
+ int16_t n, k;
11
12
+ while (std::cin >> n >> k) {
13
+ std::string names[n];
14
+ for (int16_t i = 0; i < n; i++) {
15
+ std::cin >> names[i];
16
+ }
17
+ std::sort(names, names + n);
18
19
+ std::cout << names[k - 1] << '\n';
20
21
22
+ return 0;
23
+}
0 commit comments