#include <bits/stdc++.h>
using namespace std;
#define endl "\n"
#define pb push_back
#define int long long
#define fi first
#define se second
const int N = 3e5 + 5, M = 1e9 + 7, LG = 20;
int n , A[N] , t , a , b;
void solve(){
cin >> n;
int ans = 0 , ans1 = 0;
map<int,vector<int>> mp;
for (int i=1 ; i<=n ; i++){
cin >> t >> a >> b;
if (a <= 4){
ans += 100;
// for (int k=5 ; k<=8 ; k++) mp[k].clear();
for (int j : mp[a]){
if (t-j<=10){
ans+=50;
break;
}
}
}else{
ans1 += 100;
// for (int k=1 ; k<=4 ; k++) mp[k].clear();
for (int j : mp[a]){
if (t-j<=10){
ans1+=50;
break;
}
}
}
mp[a].pb(t);
}
cout << ans << ' ' << ans1 << endl;
}
signed main(){
// freopen("" , "r" , stdin);
// freopen("" , "w" , stdout);
// cout << setprecision(30);
ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
int ts = 1;
// cin >> ts;
while(ts--){
solve();
}
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |