# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
101358 | naoai | Cave (IOI13_cave) | C++14 | 403 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 "cave.h"
#include <bits/stdc++.h>
using namespace std;
const int nmax = 5000;
bool viz[nmax + 1];
int v[nmax + 1];
int s[nmax + 1], d[nmax + 1];
void divide (int x, int y, int ind, int lst) {
if (lst == -1)
lst = nmax + 1;
if (x == y) {
s[x] = (lst > ind ? v[x] : 1 - v[x]);
d[x] = ind;
viz[x] = 1;
return ;
}
int mij = (x + y) / 2;
for (int i = x; i <= mij; ++ i)
if (viz[i] == 0)
v[i] ^= 1;
int val = tryCombination(v);
if (val == -1)
val = nmax + 1;
# | 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... |