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;
vector <ll> v;
vector <ll> v1;
vector <ll> v2;
int main()
{
ll n;
cin>>n;
ll sum1=0,sum2=0;
for(int i=0;i<n;i++)
{ll t,a,b;
cin>>t>>a>>b;
v.push_back(t);
v1.push_back(a);
v2.push_back(b);
}
if(v1[0]>=1 && v1[0]<=4)
sum1+=100;
else
sum2+=100;
for(int i=1;i<n;i++)
{
if(v1[i]>=1 && v1[i]<=4)
{sum1+=100;
if(v[i]-v[i-1]<=10 && v1[i]==v1[i-1])
sum1+=50;
}
else
{sum2+=100;
if(v[i]-v[i-1]<=10 && v1[i]==v1[i-1])
sum2+=50;
}
}
cout<<sum1<<" "<<sum2<<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... |