# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
103440 | popovicirobert | Cave (IOI13_cave) | C++14 | 1367 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;
void exploreCave(int n) {
int vis[n], s[n], d[n], aux[n], i;
for(i = 0; i < n; i++) {
vis[i] = 0;
}
for(int id = 0; id < n; id++) {
for(i = 0; i < n; i++) {
if(vis[i] == 1) {
aux[i] = s[i];
}
else {
aux[i] = 0;
}
}
int state = 0;
if(tryCombination(aux) == id) {
state = 1;
}
int res = -1;
for(int step = 1 << 15; step; step >>= 1) {
if(res + step < n) {
for(i = 0; i < n; i++) {
if(vis[i] == 0) {
if(i <= res + step) {
aux[i] = state;
# | 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... |