#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define fast ios::sync_with_stdio(false); cin.tie(0); cout.tie(0);
const ll inf = 1e9 + 7;
const ll mod = 1e9 + 7;
const ll start = 1e6 + 7;
const ll maxi = 1e5;
ll a, b, m, n, t, l, r, say=0, say1=0, say2=0, ans;
const int N = 2500 + 5;
ll dp[N];
bool comperator(pair<ll,ll> a, pair<ll,ll> b) {
return a.second < b.second;
}
vector<ll>arr;
void solve()
{
ll t;
cin>>n;ll anans=0;
ll blueberry=0;
ll alast=-100;
ll blast=-100;
while(n--) {
cin>>t>>a>>b;
if(a<5) {
if(t-alast<=10) {
anans+=50;
}
else
anans+=100;
alast=t;
}
else {
if(t-blast<=10) {
blueberry+=50;
}
else
blueberry+=100;
blast=t;
}
}
cout<<anans<<" "<<blueberry;
cout<<'\n';
}
int main()
{
fast;
ll T = 1;
//cin >> T;
while(T--) {
solve();
}
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... |