#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> sum(2);
vector<pair<int, int>> lst(2, {-1, -1000});
for (int i = 0; i < n; i++) {
int t, a, b;
cin >> t >> a >> b;
int j = (a > 4);
sum[j] += 100;
auto [p, tt] = lst[j];
if (t - tt <= 10 && p == a) {
sum[j] += 50;
}
lst[j] = {a, t};
}
cout << sum[0] << " " << sum[1] << "\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... |