#include <bits/stdc++.h>
using namespace std;
#ifdef Ramzi
#include "debug.h"
#else
#define debug(...)
#endif
int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
int n;
cin >> n;
vector<int> l(n), a(n), b(n);
for (int i = 0; i < n; i++) {
cin >> l[i] >> a[i] >> b[i];
}
int ta = 0, tb = 0;
for (int i = 0; i < n; i++) {
if (a[i] <= 4) {
ta += 100;
} else {
tb += 100;
}
if (i > 0 && l[i] - l[i - 1] <= 10 && a[i] == a[i - 1]) {
if (a[i] <= 4) {
ta += 50;
} else {
tb += 50;
}
}
}
cout << ta << " " << tb << "\n";
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |