| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 76440 | sh25_shenpy | 求第k大数 | C++ | Accepted | 0 MS | 200 KB | 267 | 2025-12-19 14:58:51 |
#include <cstdio> #include <algorithm> int n, k; int a[100010]; int main() { int n, k; scanf("%d %d", &n, &k); for(int i = 1; i <= n; i++) scanf("%d", &a[i]); std::nth_element(a + 1, a + n - k + 1, a + n + 1); printf("%d", a[n - k + 1]); return 0; }