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>
using namespace std;
bool is_from_first_team(int x) {
return x >= 1 && x <= 4;
}
signed main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
int last_at = -100;
int last_bt = -100;
int a_cnt = 0;
int b_cnt = 0;
int n;
cin >> n;
for(int i = 0; i < n; i++) {
int t, a, b;
cin >> t >> a >> b;
if(is_from_first_team(a)) {
a_cnt += 100;
if(t - last_at <= 10) {
a_cnt += 50;
}
last_at = t;
}
else {
b_cnt += 100;
if(t - last_bt <= 10) {
b_cnt += 50;
}
last_bt = t;
}
}
cout << a_cnt << ' ' << b_cnt << '\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... |