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 ff first
#define ss second
#define pb push_back
const int N=3e5+5;
int t[N],a[N],b[N];
signed main(){
int n;
cin>>n;
t[0]=-20;
int p=0,k=0;
map<int,int>mp;
for(int i=1;i<=8;i++)mp[i]=-20;
for(int i=1;i<=n;i++){
cin>>t[i]>>a[i]>>b[i];
if(a[i]<=4){
k+=100;
if(t[i]-mp[a[i]]<=10)k+=50;
}
else{
p+=100;
if(t[i]-mp[a[i]]<=10)p+=50;
}
mp[a[i]]=t[i];
}
cout<<k<<" "<<p;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |