답안 #862215

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
862215 2023-10-17T17:40:10 Z TAhmed33 Ljeto (COCI21_ljeto) C++
50 / 50
1 ms 348 KB
#include <bits/stdc++.h>
using namespace std;
int main () {
	int x = 0, y = 0;
	int prev[9];
	for (int i = 0; i <= 8; i++) prev[i] = -1e9;
	int t;
	cin >> t;
	while (t--) {
		int a, b, c;
		cin >> a >> b >> c;
		int val = 100;
		if (a - prev[b] <= 10) val += 50;
		prev[b] = a;
		if (b <= 4) x += val;
		else y += val;
	}
	cout << x << " " << y << '\n';
}
# 결과 실행 시간 메모리 Grader output
1 Correct 1 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
# 결과 실행 시간 메모리 Grader output
1 Correct 0 ms 348 KB Output is correct
2 Correct 0 ms 348 KB Output is correct
3 Correct 1 ms 348 KB Output is correct
4 Correct 0 ms 348 KB Output is correct
5 Correct 1 ms 348 KB Output is correct
6 Correct 0 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 1 ms 348 KB Output is correct
6 Correct 0 ms 348 KB Output is correct
7 Correct 1 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 Correct 0 ms 348 KB Output is correct
12 Correct 0 ms 348 KB Output is correct
13 Correct 0 ms 348 KB Output is correct