#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
int n; cin>>n;
ll prev=-1;
ll prev_p=0;
ll p=0;
ll b=0;
while (n--) {
ll t; int a,b;
cin>>t>>a>>b;
if (prev==-1) {
prev=t;
prev_p=a;
if (a<=4) p+=100;
else b+=100;
} else {
if (prev+10>=t&&a==prev_p) {
prev=t;
if (a<=4) p+=150;
else b+=150;
} else {
prev=t;
prev_p=a;
if (a<=4) p+=100;
else b+=100;
}
}
}
cout<<p<<" "<<b;
return 0;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
348 KB |
Output is correct |
2 |
Incorrect |
0 ms |
344 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
1 ms |
344 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |