#include "bits/stdc++.h"
using namespace std;
#define ln "\n"
#define pb push_back
#define fi first
#define se second
#define all(x) (x).begin(), (x).end()
#define sz(x) ((int)(x).size())
#define int long long
const int MOD = 1e9 + 7;
const int inf = 2e18;
const int N = 105;
int n, pre[10];
signed main() {
cin.tie(0) -> sync_with_stdio(0);
cin >> n;
int A = 0, B = 0;
for(int i = 1; i <= n; i++) {
int t, a, b; cin >> t >> a >> b;
if(a < b) {
A += 100;
if(t - pre[a] <= 10 and pre[a] != 0) A += 50;
pre[a] = t;
} else {
B += 100;
if(t - pre[a] <= 10 and pre[a] != 0) B += 50;
pre[a] = t;
}
}
cout << A << ' ' << B << ln;
cerr << "\nTime: " << clock() * 1000 / CLOCKS_PER_SEC;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |