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 <iostream>
using namespace std;
int main()
{
int n;
cin>>n;
int sum1=0,sum2=0;
int a[n],b[n],c[n];
for(int i=0;i<n;i++){
cin>>a[i]>>b[i]>>c[i];
if(a[i]-a[i-1]<=10&&b[i]==b[i-1]&&b[i]>=5)sum2+=50;
if((a[i]-a[i-1]<=10&&b[i]==b[i-1]&&b[i]<5))sum1+=50;
if(b[i]<5)sum1+=100;
if(b[i]>=5)sum2+=100;
}
cout<<sum1<<' '<<sum2;
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... |