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 main(){
int n;
cin>>n;
int a,b,c;
cin>>a>>b>>c;
int ans1 = 0;
int ans2 = 0;
if(b<5){
ans1 = 100;
}
else{
ans2 = 100;
}
for(int i=1 ; i<n ; i++){
int x,y,z;
cin>>x>>y>>z;
if(y==b && y<5 && abs(x-a)<=10){
ans1 += 150;
}
else if(y==b && y<5 && abs(x-a)>10){
ans1 += 100;
}
else if(y==b && y>4 && abs(x-a)<=10){
ans2 += 150;
}
else if(y==b && y>4 && abs(x-a)>10){
ans2 += 100;
}
else if(y>4){
ans2 += 100;
}
else if(y<5){
ans1 += 100;
}
a = x;
b = y;
c = z;
}
cout << ans1 <<" " << ans2 << endl;
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... |