Submission #862340

# Submission time Handle Problem Language Result Execution time Memory
862340 2023-10-18T05:07:49 Z maks007 Olympiads (BOI19_olympiads) C++14
13 / 100
7 ms 1052 KB
#include "bits/stdc++.h"
 
using namespace std;
 
signed main () {
	int n, m, k;
	cin >> n >> m >> k;
	assert(m == 2);
	int a[n][m];
	for(int i = 0; i < n; i ++) {
		for(int j = 0; j < m; j ++) {
			cin >> a[i][j];
		}
	}
	vector <int> v;
	for(int i = 0; i < n; i ++) {
		for(int j = i + 1; j < n; j ++) {
			v.push_back(max(a[i][0], a[j][0]) + max(a[i][1], a[j][1]));
		}
	}
	sort(v.rbegin(), v.rend());
	cout << v[k-1];
	return 0;
}
# Verdict Execution time Memory Grader output
1 Correct 7 ms 984 KB Output is correct
2 Correct 6 ms 984 KB Output is correct
3 Correct 5 ms 984 KB Output is correct
4 Correct 3 ms 1052 KB Output is correct
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Runtime error 1 ms 348 KB Execution killed with signal 6
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Correct 7 ms 984 KB Output is correct
2 Correct 6 ms 984 KB Output is correct
3 Correct 5 ms 984 KB Output is correct
4 Correct 3 ms 1052 KB Output is correct
5 Runtime error 1 ms 348 KB Execution killed with signal 6
6 Halted 0 ms 0 KB -