#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 |
1 |
Correct |
1 ms |
300 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
212 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
300 KB |
Output is correct |
# |
Verdict |
Execution time |
Memory |
Grader output |
1 |
Correct |
1 ms |
300 KB |
Output is correct |
2 |
Correct |
1 ms |
212 KB |
Output is correct |
3 |
Correct |
1 ms |
212 KB |
Output is correct |
4 |
Correct |
1 ms |
212 KB |
Output is correct |
5 |
Correct |
1 ms |
212 KB |
Output is correct |
6 |
Correct |
1 ms |
212 KB |
Output is correct |
7 |
Correct |
1 ms |
212 KB |
Output is correct |
8 |
Correct |
1 ms |
300 KB |
Output is correct |
9 |
Correct |
0 ms |
212 KB |
Output is correct |
10 |
Correct |
1 ms |
212 KB |
Output is correct |
11 |
Incorrect |
1 ms |
212 KB |
Output isn't correct |
12 |
Halted |
0 ms |
0 KB |
- |