# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
123718 | MAMBA | Cave (IOI13_cave) | C++17 | 1087 ms | 640 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 "cave.h"
using namespace std;
#define rep(i , j , k) for (int i = j; i < (int)k; i++)
int N, P[5010], Q[5010], local[5010];
inline bool ask(int lim , int tp, int door) {
rep(i , 0 , lim) {
if (~P[i])
local[i] = Q[i];
else
local[i] = tp;
}
rep(i , lim , N) {
if (~P[i])
local[i] = Q[i];
else
local[i] = tp ^ 1;
}
int res = tryCombination(local);
return res == -1 || res > door;
}
void exploreCave(int N_) {
N = N_;
memset(P , -1, sizeof(P));
memset(Q , 0 , sizeof(Q));
rep(i , 0 , 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |