Submission #75814842
Source Code Expand
#include <bits/stdc++.h>
#define all(x) (x).begin(), (x).end()
using namespace std;
using ll = long long;
int n, k;
ll m;
int main() {
cin.tie(0), ios_base::sync_with_stdio(0);
cin >> n >> k >> m;
vector<int> a(n), b;
for (auto& i : a) cin >> i, b.push_back(i);
sort(all(b));
if (m <= n) {
cout << a[m - 1] << endl;
exit(0);
}
cout << b[k - 1] << endl;
}
Submission Info
| Submission Time | |
|---|---|
| Task | F - The Kth Smallest Number |
| User | pluie |
| Language | C++23 (GCC 15.2.0) |
| Score | 100 |
| Code Size | 427 Byte |
| Status | AC |
| Exec Time | 33 ms |
| Memory | 6744 KiB |
Judge Result
| Set Name | Sample | All | ||
|---|---|---|---|---|
| Score / Max Score | 0 / 0 | 100 / 100 | ||
| Status | AC |
|
| Set Name | Test Cases |
|---|---|
| Sample | |
| All | 01-001.txt, 01-002.txt, 01-003.txt, 01-004.txt, 01-005.txt, 01-006.txt, 01-007.txt, 01-008.txt, 01-009.txt, 01-010.txt, 01-011.txt, 01-012.txt, 01-013.txt, 01-014.txt, 01-015.txt, 01-016.txt, 01-017.txt, 01-018.txt, 01-019.txt, 01-020.txt, 01-021.txt, 01-022.txt, 01-023.txt, 01-024.txt, 01-025.txt, 01-026.txt, 01-027.txt |
| Case Name | Status | Exec Time | Memory |
|---|---|---|---|
| 01-001.txt | AC | 1 ms | 3440 KiB |
| 01-002.txt | AC | 1 ms | 3456 KiB |
| 01-003.txt | AC | 1 ms | 3524 KiB |
| 01-004.txt | AC | 1 ms | 3476 KiB |
| 01-005.txt | AC | 1 ms | 3456 KiB |
| 01-006.txt | AC | 1 ms | 3448 KiB |
| 01-007.txt | AC | 1 ms | 3456 KiB |
| 01-008.txt | AC | 1 ms | 3412 KiB |
| 01-009.txt | AC | 1 ms | 3452 KiB |
| 01-010.txt | AC | 1 ms | 3476 KiB |
| 01-011.txt | AC | 1 ms | 3488 KiB |
| 01-012.txt | AC | 1 ms | 3420 KiB |
| 01-013.txt | AC | 33 ms | 6576 KiB |
| 01-014.txt | AC | 33 ms | 6604 KiB |
| 01-015.txt | AC | 32 ms | 6656 KiB |
| 01-016.txt | AC | 32 ms | 6656 KiB |
| 01-017.txt | AC | 19 ms | 5156 KiB |
| 01-018.txt | AC | 17 ms | 5088 KiB |
| 01-019.txt | AC | 30 ms | 6668 KiB |
| 01-020.txt | AC | 32 ms | 6620 KiB |
| 01-021.txt | AC | 16 ms | 6576 KiB |
| 01-022.txt | AC | 15 ms | 6688 KiB |
| 01-023.txt | AC | 12 ms | 6596 KiB |
| 01-024.txt | AC | 28 ms | 6744 KiB |
| 01-025.txt | AC | 10 ms | 6740 KiB |
| 01-026.txt | AC | 32 ms | 6624 KiB |
| 01-027.txt | AC | 28 ms | 6596 KiB |