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;
using lint = long long;
const int maxn = 1005;
const int inf = 1e9 + 5;
const int mod = 1e9 + 7;
int n;
int score[2];
int last[maxn];
signed main() {
#ifdef Local
freopen("in.txt", "r", stdin);
freopen("out.txt", "w", stdout);
#endif
cin >> n;
fill(last + 1, last + n + 1, -inf);
for(int i = 1, t, x, y; i <= n; i++) {
cin >> t >> x >> y;
int team = x > 4;
score[team] += 100;
if(t - last[x] <= 10)
score[team] += 50;
last[x] = t;
}
cout << score[0] << " " << score[1] << 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... |