| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 99421 | JustasLe | 동굴 (IOI13_cave) | C++17 | 139 ms | 512 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 maxn = (int) 5e3 + 10;
int a[maxn], b[maxn], d[maxn];
void exploreCave(int n) {
for (int i = 0; i < n; i++) {
a[i] = b[i] = d[i] = 0;
}
for (int i = 0; i < n; i++) {
int l = 0, r = n - 1, p, t;
t = tryCombination(a);
while (l < r) {
int m = (l + r) / 2;
for (int j = l; j <= m; j++) {
if (!d[i]) {
a[j] = !a[j];
}
}
p = t, t = tryCombination(a);
(p == i) ^ (p == t) ? r = m : l = m + 1;
}
if (t == i) {
a[l] = !a[l];
}
b[l] = i, d[l] = 1;
}
answer(a, b);
}| # | 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... | ||||
