# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
898771 | duckindog | Ljeto (COCI21_ljeto) | C++14 | 0 ms | 348 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
// from duckindog wth depression
#include<bits/stdc++.h>
using namespace std;
const int N = 110;
int n;
int t[N], a[N], b[N];
int32_t main() {
cin.tie(0)->sync_with_stdio(0);
if (fopen("duck.inp", "r")) {
freopen("duck.inp", "r", stdin);
freopen("duck.out", "w", stdout);
}
cin >> n;
for (int i = 1; i <= n; ++i) cin >> t[i] >> a[i] >> b[i];
int A = 0, B = 0;
for (int i = 1; i <= n; ++i) {
int &ret = a[i] <= 4 ? A : B;
ret += 100;
for (int j = i - 1; j >= 1; --j) {
if (t[i] - t[j] > 10) break;
if (a[i] == a[j]) {
ret += 50;
break;
}
}
}
cout << A << ' ' << B << '\n';
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |