This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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 pi=0;
ll bl=0;
while (n--) {
ll t; int a,b;
cin>>t>>a>>b;
if (prev==-1) {
prev=t;
prev_p=a;
if (a<=4) pi+=100;
else bl+=100;
} else {
if (prev+10>=t&&a==prev_p) {
prev=t;
if (a<=4) pi+=150;
else bl+=150;
} else {
prev=t;
prev_p=a;
if (a<=4) pi+=100;
else bl+=100;
}
}
}
cout<<pi<<" "<<bl;
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |