| # | Time | Username | Problem | Language | Result | Execution time | Memory |
|---|---|---|---|---|---|---|---|
| 543063 | pokmui9909 | Cave (IOI13_cave) | C++17 | 15 ms | 396 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;
using ll = long long;
int sw[5005], match[5005];
void exploreCave(int N) {
memset(match, -1, sizeof(match));
for(int i = 0; i < N; i++){
ll L = 0, R = N - 1;
bool f = (tryCombination(sw) == i);
while(L <= R){
ll m = (L + R) / 2;
for(int j = L; j <= m; j++){
if(match[j] == -1){
sw[j] = 1;
}
}
if((tryCombination(sw) == i) == f) L = m + 1;
else R = m - 1;
for(int j = L; j <= m; j++){
if(match[j] == -1){
sw[j] = 0;
}
}
}
match[L - 1] = i, sw[L - 1] = f;
}
answer(sw, match);
}
| # | 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... | ||||
