#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;
bool vi[9] = {};
map<int,int> mp;
for (int i=1 ; i<=n ; i++){
cin >> t >> a >> b;
if (a <= 4){
ans += 100;
if (vi[a] && t-mp[a] <= 10){
ans += 50;
}
}else{
ans1 += 100;
if (vi[a] && t-mp[a] <= 10){
ans += 50;
}
}
mp[a] = t;
vi[a] = 1;
}
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... |