# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
399683 | KoD | Koala Game (APIO17_koala) | C++17 | 47 ms | 328 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.
#include <bits/stdc++.h>
#include "koala.h"
int minValue(int N, int W) {
int B[100] = {}, R[100] = {};
B[0] = 1;
playRound(B, R);
for (int i = 0; i < N; ++i) {
if (R[i] <= B[i]) {
return i;
}
}
assert(false);
return -1;
}
int maxValue(int N, int W) {
int B[100] = {}, R[100] = {};
std::vector<int> cand(N);
std::iota(cand.begin(), cand.end(), 0);
while (cand.size() > 1) {
std::fill(B, B + N, 0);
for (const auto x: cand) {
B[x] = W / cand.size();
}
playRound(B, R);
std::vector<int> next;
for (const auto x: cand) {
if (R[x] > B[x]) {
next.push_back(x);
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |