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;
int main(){
int n;
cin >> n;
int last[9];
memset(last, -1, sizeof last);
int ans[2] = {};
for (int i = 0; i < n; i ++){
int t, a, b;
cin >> t >> a >> b;
if (last[a] >= 0 and last[a] >= t - 10)
ans[(a < 5)] += 50;
ans[(a < 5)] += 100;
last[a] = t;
}
cout << ans[1] << " " << ans[0] << endl;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |