#include <bits/stdc++.h>
using namespace std;
#define int long long
const int modulo = 1e9+7;
int32_t main(){
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<int> lastspray(9,-20);
int scorea = 0,scoreb = 0;
for(int i=1;i<=n;i++){
int t,a,b;cin>>t>>a>>b;
if(a>4){
scoreb+=100;
if(t-lastspray[a]<=10)scoreb+=50;
lastspray[a]=t;
} else {
scorea+=100;
if(t-lastspray[a]<=10)scorea+=50;
lastspray[a]=t;
}
}
cout << scorea << ' ' << scoreb << '\n';
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |