#include <bits/stdc++.h>
#define endl '\n'
using namespace std;
#define ll long long
#define ld long double
#define pll pair<ll,ll>
#define pb push_back
ll T=1,n,nq,x,y,ind,t,dp[5000099][3],k,mx,rs=0,c,pr,lft,a[2000009];
string s;
//map<ll,ll>ma;
void slv()
{
cin>>n;
pr=0;lft=0;rs=0;
ll t2=0,t1=0;
for(int i=1;i<=8;i++)a[i]=-100;
for(int i=1;i<=n;i++)
{
cin>>t>>x>>y;
if(t-a[x]<=10)
{
if(x<=4)t1+=50;
else t2+=50;
}
if(x<=4)t1+=100;
else t2+=100;
a[x]=t;
}
cout<<t1<<" "<<t2<<endl;
}
int main() {
//freopen("feast.in", "r", stdin);
//freopen("feast.out", "w", stdout);
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
//cin>>T;
while(T--)
slv();
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... |