This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
using namespace std;
#include <bits/stdc++.h>
int main(){
int N;
cin>>N;
int T[N+1];
int A[N+1];
int B[N+1];
for(int i=1;i<=N;i++){
cin>>T[i]>>A[i]>>B[i];
}
int poinA=0;
int poinB=0;
int lastTime[9];
fill(lastTime,lastTime+9,0);
for(int i=1;i<=N;i++){
if(A[i]<=4){
poinA+=100;
if(lastTime[A[i]]!=0&&T[i]-lastTime[A[i]]<=10){
poinA+=50;
}
lastTime[A[i]]=T[i];
}else{
poinB+=100;
if(lastTime[A[i]]!=0&&T[i]-lastTime[A[i]]<=10){
poinB+=50;
}
lastTime[A[i]]=T[i];
}
}
cout<<poinA<<" "<<poinB<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |