답안 #887498

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
887498 2023-12-14T16:17:39 Z MinaRagy06 Team Contest (JOI22_team) C++17
8 / 100
2000 ms 2140 KB
#include <bits/stdc++.h>
using namespace std;
#define ll long long

int main() {
	ios_base::sync_with_stdio(0), cin.tie(0);
	int n;
	cin >> n;
	array<int, 3> a[n];
	for (int i = 0; i < n; i++) {
		cin >> a[i][0] >> a[i][1] >> a[i][2];
	}
	int ans = -1;
	for (int i = 0; i < n; i++) {
		for (int j = 0; j < n; j++) {
			for (int k = 0; k < n; k++) {
				if (a[i][0] > a[j][0] && a[i][0] > a[k][0] && 
					a[j][1] > a[i][1] && a[j][1] > a[k][1] && 
					a[k][2] > a[i][2] && a[k][2] > a[j][2]) {
					ans = max(ans, a[i][0] + a[j][1] + a[k][2]);
				}
			}
		}
	}
	cout << ans << '\n';
	return 0;
}


# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 46 ms 456 KB Output is correct
15 Correct 19 ms 348 KB Output is correct
16 Correct 28 ms 348 KB Output is correct
17 Correct 36 ms 344 KB Output is correct
18 Correct 37 ms 344 KB Output is correct
19 Correct 43 ms 348 KB Output is correct
20 Correct 32 ms 348 KB Output is correct
21 Correct 20 ms 348 KB Output is correct
22 Correct 25 ms 348 KB Output is correct
23 Correct 18 ms 344 KB Output is correct
24 Correct 23 ms 344 KB Output is correct
25 Correct 23 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 46 ms 456 KB Output is correct
15 Correct 19 ms 348 KB Output is correct
16 Correct 28 ms 348 KB Output is correct
17 Correct 36 ms 344 KB Output is correct
18 Correct 37 ms 344 KB Output is correct
19 Correct 43 ms 348 KB Output is correct
20 Correct 32 ms 348 KB Output is correct
21 Correct 20 ms 348 KB Output is correct
22 Correct 25 ms 348 KB Output is correct
23 Correct 18 ms 344 KB Output is correct
24 Correct 23 ms 344 KB Output is correct
25 Correct 23 ms 348 KB Output is correct
26 Execution timed out 2044 ms 604 KB Time limit exceeded
27 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Execution timed out 2090 ms 2140 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Execution timed out 2090 ms 2140 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Execution timed out 2090 ms 2140 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 344 KB Output is correct
2 Correct 0 ms 344 KB Output is correct
3 Correct 0 ms 344 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 348 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Execution timed out 2090 ms 2140 KB Time limit exceeded
12 Halted 0 ms 0 KB -
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 0 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 0 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 0 ms 348 KB Output is correct
8 Correct 0 ms 348 KB Output is correct
9 Correct 0 ms 344 KB Output is correct
10 Correct 0 ms 348 KB Output is correct
11 Correct 0 ms 348 KB Output is correct
12 Correct 1 ms 348 KB Output is correct
13 Correct 1 ms 348 KB Output is correct
14 Correct 46 ms 456 KB Output is correct
15 Correct 19 ms 348 KB Output is correct
16 Correct 28 ms 348 KB Output is correct
17 Correct 36 ms 344 KB Output is correct
18 Correct 37 ms 344 KB Output is correct
19 Correct 43 ms 348 KB Output is correct
20 Correct 32 ms 348 KB Output is correct
21 Correct 20 ms 348 KB Output is correct
22 Correct 25 ms 348 KB Output is correct
23 Correct 18 ms 344 KB Output is correct
24 Correct 23 ms 344 KB Output is correct
25 Correct 23 ms 348 KB Output is correct
26 Execution timed out 2044 ms 604 KB Time limit exceeded
27 Halted 0 ms 0 KB -