#include<iostream>
using namespace std;
int main()
{
int n;
cin >> n;
int last[8] = {};
for(int i = 0; i < 8; i++) last[i] = -20;
int s1 = 0, s2 = 0;
while(n--)
{
int t , a, b;
cin >> t >> a >> b;
if(a <= 4)
{
s1 += 100;
if(t - last[a] <= 10) s1 += 50;
last[a] = t;
}
else
{
s2 += 100;
if(t - last[a] <= 10) s2 += 50;
last[a] = t;
}
}
cout << s1 << ' ' << s2 << endl;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
1 ms |
432 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
4 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Correct |
0 ms |
348 KB |
Output is correct |
3 |
Correct |
1 ms |
432 KB |
Output is correct |
4 |
Correct |
0 ms |
348 KB |
Output is correct |
5 |
Incorrect |
0 ms |
348 KB |
Output isn't correct |
6 |
Halted |
0 ms |
0 KB |
- |