Submission #75814655


Source Code Expand

#pragma GCC optimize("Ofast,unroll-loops")
#include <bits/stdc++.h>
#define rep(i, s, e) for (ll i = (s); i <= (e); i++)
#define all(v) v.begin(), v.end()
#define pb push_back
using namespace std;
using ll = long long;
using ull = unsigned long long;
using ld = long double;
using P = array<ll, 2>;
ll n, k, m, a[303030];
int main() {
	cin.tie(0)->sync_with_stdio(0);
	cin >> n >> k >> m;
	rep(i, 1, n) cin >> a[i];
	if (m <= n) {
		cout << a[m];
		return 0;
	}
	sort(a + 1, a + n + 1);
	cout << a[k];
	return 0;
}

Submission Info

Submission Time
Task F - The Kth Smallest Number
User iAi
Language C++23 (GCC 15.2.0)
Score 100
Code Size 536 Byte
Status AC
Exec Time 36 ms
Memory 6076 KiB

Judge Result

Set Name Sample All
Score / Max Score 0 / 0 100 / 100
Status AC
AC × 27
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 2 ms 3556 KiB
01-002.txt AC 1 ms 3480 KiB
01-003.txt AC 1 ms 3496 KiB
01-004.txt AC 1 ms 3496 KiB
01-005.txt AC 1 ms 3644 KiB
01-006.txt AC 1 ms 3428 KiB
01-007.txt AC 1 ms 3612 KiB
01-008.txt AC 1 ms 3608 KiB
01-009.txt AC 1 ms 3644 KiB
01-010.txt AC 1 ms 3620 KiB
01-011.txt AC 1 ms 3440 KiB
01-012.txt AC 1 ms 3540 KiB
01-013.txt AC 17 ms 5988 KiB
01-014.txt AC 17 ms 5988 KiB
01-015.txt AC 36 ms 5992 KiB
01-016.txt AC 36 ms 6076 KiB
01-017.txt AC 21 ms 5020 KiB
01-018.txt AC 19 ms 4708 KiB
01-019.txt AC 34 ms 5708 KiB
01-020.txt AC 36 ms 5988 KiB
01-021.txt AC 18 ms 5872 KiB
01-022.txt AC 17 ms 5988 KiB
01-023.txt AC 14 ms 5912 KiB
01-024.txt AC 32 ms 5944 KiB
01-025.txt AC 10 ms 6076 KiB
01-026.txt AC 16 ms 6052 KiB
01-027.txt AC 12 ms 6044 KiB