#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ff first
#define ss second
int main(){
ll n; cin >> n;
vector<pair<ll, ll>>tm(n);
ll sc1 = 0, sc2 = 0;
for(ll i = 0; i < n; i++){
ll a, b; cin >> tm[i].ff >> a >> b;
if(a <= 4) sc1 += 100, tm[i].ss = a;
else sc2 += 100, tm[i].ss = a;
if(i and tm[i - 1].ff + 10 >= tm[i].ff and (tm[i - 1].ss == tm[i].ss)){
if(a <= 4) sc1 += 50;
else sc2 += 50;
}
} cout << sc1 << ' ' << sc2;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |