Submission #75817853


Source Code Expand

#include <bits/stdc++.h>
using namespace std;
using ll = long long;


int main() {

	ll n, m, k;
	cin >> n >> k >> m;
	vector<int>a(n + 1);
	a[0] = -2e9;
	for (int i = 1; i <= n; i++) {
		cin >> a[i];
	}
	if (m > n) {
		sort(a.begin(), a.end());

		cout << a[k];
	}
	else {
		cout << a[m];
	}





	return 0;
}

Submission Info

Submission Time
Task F - The Kth Smallest Number
User mollusca
Language C++23 (GCC 15.2.0)
Score 100
Code Size 338 Byte
Status AC
Exec Time 97 ms
Memory 4552 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 1 ms 3592 KiB
01-002.txt AC 1 ms 3444 KiB
01-003.txt AC 1 ms 3388 KiB
01-004.txt AC 1 ms 3472 KiB
01-005.txt AC 1 ms 3512 KiB
01-006.txt AC 1 ms 3472 KiB
01-007.txt AC 1 ms 3480 KiB
01-008.txt AC 1 ms 3540 KiB
01-009.txt AC 1 ms 3528 KiB
01-010.txt AC 1 ms 3512 KiB
01-011.txt AC 1 ms 3388 KiB
01-012.txt AC 1 ms 3444 KiB
01-013.txt AC 79 ms 4552 KiB
01-014.txt AC 79 ms 4288 KiB
01-015.txt AC 97 ms 4340 KiB
01-016.txt AC 97 ms 4288 KiB
01-017.txt AC 59 ms 4040 KiB
01-018.txt AC 53 ms 3936 KiB
01-019.txt AC 91 ms 4396 KiB
01-020.txt AC 97 ms 4440 KiB
01-021.txt AC 90 ms 4304 KiB
01-022.txt AC 83 ms 4380 KiB
01-023.txt AC 56 ms 4396 KiB
01-024.txt AC 70 ms 4424 KiB
01-025.txt AC 28 ms 4304 KiB
01-026.txt AC 79 ms 4288 KiB
01-027.txt AC 52 ms 4440 KiB