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;
#define int long long
#define fi first
#define se second
#define pb push_back
signed main()
{
ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0);
// freopen("input.000","r",stdin);
// freopen("output.000","w",stdout);
// srand((unsigned)time(NULL));
// rand()
int n,i,t,a,b,l[10],a_ans,b_ans;
for (i=1;i<9;i++) l[i]=-1e9;
a_ans=0;b_ans=0;
cin>>n;
for (i=1;i<n+1;i++)
{
cin>>t>>a>>b;
if (a<=4) a_ans+=100;else b_ans+=100;
if (t-l[a]<=10)
{
if (a<=4) a_ans+=50;else b_ans+=50;
}
l[a]=t;
}
cout<<a_ans<<" "<<b_ans;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |