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;
int n, last[10],L,R;
int main(){
ios::sync_with_stdio(false); cin.tie(0);
cin>>n;
memset(last, -1, sizeof last);
for(int i = 1, t,a,b; i <= n; i++){
cin>>t>>a>>b;
if(a <= 4) L += 100;
else R += 100;
if(last[a] != -1 and t - last[a] <= 10){
if(a <= 4) L += 50;
else R += 50;
}
last[a]=t;
}
cout<<L<<" "<<R<<"\n";
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |