# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
537160 | davi_bart | Ljeto (COCI21_ljeto) | C++14 | 1 ms | 212 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.
#pragma GCC optimize("O3")
#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define int ll
#define fi first
#define se second
#define ld long double
#define pb push_back
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
signed main() {
ios::sync_with_stdio(false);
cin.tie(0);
int N;
cin >> N;
vector<int> v[2];
array<int, 2> tot = {0, 0};
for (int i = 0; i < N; i++) {
int a, b, c;
cin >> a >> b >> c;
b /= 5;
v[b].pb(a);
}
for (int i = 0; i < 2; i++) {
sort(v[i].begin(), v[i].end());
for (int j = 0; j < v[i].size(); j++) {
tot[i] += 100;
if (j > 0 && v[i][j - 1] + 10 > v[i][j]) tot[i] += 50;
}
}
cout << tot[0] << " " << tot[1] << '\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... |