#include <bits/stdc++.h>
using namespace std;
int main () {
int n, m, k; cin >> n >> m >> k;
int a[n][m];
for(int i = 0; i < n; i++) for(int j = 0; j < m; j++) cin >> a[i][j];
vector<int> b;
for(int i = 0; i < n; i++) for(int j = i + 1; j < n; j++) b.push_back(max(a[i][0], a[j][0]) + max(a[i][1], a[j][1]));
sort(b.rbegin(), b.rend());
cout << b[k - 1];
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
980 KB |
Output is correct |
2 |
Correct |
6 ms |
984 KB |
Output is correct |
3 |
Correct |
5 ms |
984 KB |
Output is correct |
4 |
Correct |
2 ms |
984 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
5 ms |
980 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
980 KB |
Output is correct |
2 |
Correct |
6 ms |
984 KB |
Output is correct |
3 |
Correct |
5 ms |
984 KB |
Output is correct |
4 |
Correct |
2 ms |
984 KB |
Output is correct |
5 |
Incorrect |
1 ms |
348 KB |
Output isn't correct |
6 |
Halted |
0 ms |
0 KB |
- |