n = int(input())
last = [-100]*8
s = [0, 0]
for i in range(n):
t, a, b = map(int, input().split())
a-=1
b-=1
s[a > b] += 100
if t - last[a] <= 10:
s[a > b] += 50
last[a] = t
print(*s)
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
12 ms |
2708 KB |
Output is correct |
2 |
Correct |
21 ms |
2708 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
15 ms |
2720 KB |
Output is correct |
2 |
Correct |
14 ms |
2764 KB |
Output is correct |
3 |
Correct |
19 ms |
2800 KB |
Output is correct |
4 |
Correct |
18 ms |
2804 KB |
Output is correct |
5 |
Correct |
13 ms |
2812 KB |
Output is correct |
6 |
Correct |
12 ms |
2760 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
12 ms |
2708 KB |
Output is correct |
2 |
Correct |
21 ms |
2708 KB |
Output is correct |
3 |
Correct |
15 ms |
2720 KB |
Output is correct |
4 |
Correct |
14 ms |
2764 KB |
Output is correct |
5 |
Correct |
19 ms |
2800 KB |
Output is correct |
6 |
Correct |
18 ms |
2804 KB |
Output is correct |
7 |
Correct |
13 ms |
2812 KB |
Output is correct |
8 |
Correct |
12 ms |
2760 KB |
Output is correct |
9 |
Correct |
13 ms |
2764 KB |
Output is correct |
10 |
Correct |
13 ms |
2788 KB |
Output is correct |
11 |
Correct |
13 ms |
2764 KB |
Output is correct |
12 |
Correct |
13 ms |
2752 KB |
Output is correct |
13 |
Correct |
15 ms |
2776 KB |
Output is correct |