This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include <bits/stdc++.h>
#define INF 0x3f3f3f3f
using namespace std;
void test_case() {
int n;
cin >> n;
int s1 = 0, s2 = 0;
vector<int> last(9, -INF);
for (int i = 1; i <= n; ++i) {
int t, a, b;
cin >> t >> a >> b;
if (a <= 4) {
s1 += 100;
if (t - last[a] <= 10) {
s1 += 50;
}
} else {
s2 += 100;
if (t - last[a] <= 10) {
s2 += 50;
}
}
last[a] = t;
}
cout << s1 << ' ' << s2 << '\n';
}
int main() {
ios_base::sync_with_stdio(false);
cin.tie(nullptr);
int t = 1;
for (int tc = 1; tc <= t; ++tc) {
test_case();
}
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... |