# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
97229 | E869120 | Koala Game (APIO17_koala) | C++14 | 81 ms | 680 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 "koala.h"
#include <iostream>
#include <vector>
using namespace std;
int D[109], R[109];
void preset() {
for (int i = 0; i < 109; i++) { D[i] = 0; R[i] = 0; }
}
int minValue(int N, int W) {
preset(); D[0] = 1;
playRound(D, R);
for (int i = 0; i < N; i++) {
if (D[i] >= R[i]) return i;
}
return -1;
}
int maxValue(int N, int W) {
int P[4] = { 1, 2, 4, 11 };
vector<int>I; for (int i = 0; i < N; i++) I.push_back(i);
for (int i = 0; i < 4; i++) {
preset();
for (int j = 0; j < I.size(); j++) D[I[j]] = P[i];
playRound(D, R);
vector<int>II; for (int j = 0; j < I.size(); j++) { if (D[I[j]] < R[I[j]]) II.push_back(I[j]); }
I = II;
}
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... |