#include <bits/stdc++.h>
#define owo ios_base::sync_with_stdio(0);cin.tie(0);
#define all(v) (v).begin(),(v).end()
#define pb push_back
#define fi first
#define se second
typedef long long int ll;
using namespace std;
int main() {
owo
int n; cin >> n;
vector<int> cur(9);
int sc1 = 0, sc2 = 0;
for (int i = 0; i < 9; i++) {
cur[i] = -100;
}
for (int i = 0; i < n; i++) {
int t, a, b; cin >> t >> a >> b;
if (a <= 4) {
if (cur[a] >= t-10) sc1 += 150;
else sc1 += 100;
cur[a] = t;
} else {
if (cur[a] >= t-10) sc2 += 150;
else sc2 += 100;
cur[a] = t;
}
}
cout << sc1 << " " << sc2;
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... |