#include <bits/stdc++.h>
using namespace std;
int main(){
int n;
cin >> n;
int last[8];
memset(last, -1, sizeof last);
int ans[2] = {};
for (int i = 0; i < n; i ++){
int t, a, b;
cin >> t >> a >> b;
if (last[a] >= 0 and last[a] >= t - 10)
ans[(a < 5)] += 50;
ans[(a < 5)] += 100;
last[a] = t;
}
cout << ans[1] << " " << ans[0] << endl;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 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 |
600 KB |
Output is correct |
3 |
Incorrect |
1 ms |
344 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 |
0 ms |
348 KB |
Output is correct |
4 |
Correct |
0 ms |
600 KB |
Output is correct |
5 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
6 |
Halted |
0 ms |
0 KB |
- |