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;
const int M = 8 + 5, INF = 1e9 + 5;
int n, t, a, b, ansa, ansb, last[M];
int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
fill(last, last + M, -INF);
cin >> n;
while(n--){
cin >> t >> a >> b;
if(a <= 4) ansa += 100 + (t - last[a] <= 10 ? 50 : 0);
else ansb += 100 + (t - last[a] <= 10 ? 50 : 0);
last[a] = t;
}
cout << ansa << " " << ansb;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |