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>
#define int long long
using namespace std;
signed main()
{
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int n; cin>>n;
int a[9]; for(int i=1;i<9;i++) a[i]=-1e9;
int x=0,y=0;
while(n--)
{
int t,u,v; cin>>t>>u>>v;
if(u<5)
{
x+=100;
if(t-a[u]<=10) x+=50;
}
else
{
y+=100;
if(t-a[u]<=10) y+=50;
}
a[u]=t;
}
cout<<x<<' '<<y<<endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |