# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1224178 | sleepntsheep | Olympiads (BOI19_olympiads) | C++17 | 1 ms | 836 KiB |
#include <stdio.h>
#include <algorithm>
using namespace std;
#define N 505
#define K 3
int n, c, k, a[N][K], cc[N * N], tp;
int main() {
scanf("%d%d%d", &n, &k, &c);
for (int i = 0; i < n; ++i)
for (int j = 0; j < k; ++j)
scanf("%d", &a[i][j]);
for (int i = 0; i < n; ++i)
for (int j = i + 1; j < n; ++j) {
cc[tp++] = max(a[i][0], a[j][0]) + max(a[j][1], a[i][1]);
}
nth_element(cc, cc + c - 1, cc + tp);
printf("%d\n", cc[c - 1]);
return 0;
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |