# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
108359 | RezwanArefin01 | Koala Game (APIO17_koala) | C++17 | 76 ms | 504 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"
using namespace std;
int p[100], q[100];
int minValue(int N, int W) {
p[0] = 1;
playRound(p, q);
for(int i = 0; i < N; ++i)
if(!q[i]) return i;
return -1;
}
int maxValue(int N, int W) {
return -1;
}
int greaterValue(int N, int W) {
int lo = 1, hi = min(W / 2, 9);
while(lo <= hi) {
int mid = lo + hi >> 1;
p[0] = p[1] = mid;
playRound(p, q);
bool z = q[0] > p[0];
bool o = q[1] > p[1];
if(z == o) {
if(z) lo = mid + 1;
else hi = mid - 1;
} else {
return z ? 0 : 1;
}
} return -1;
}
void allValues(int N, int W, int *P) {
if (W == 2*N) {
} else {
}
}
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... |