#include "cave.h"
#include <bits/stdc++.h>
using namespace std;
void exploreCave(int n) {
int s[n], d[n];
for (int i = 0; i < n; i++) {
s[i] = 0;
}
for (int i = 0; i < n; i++) {
int posicion = 0;
for (int j = 0; j < n; j++) {
int closed = tryCombination(s);
if (closed == posicion){
s[j]= 1;
int open = tryCombination(s);
if (open != posicion){
d[i]= j;
}
break;
}
int open = tryCombination(s);
if (open != posicion){
s[j]= 1;
int closed = tryCombination(s);
if (closed == posicion){
d[i]= j;
}
break;
}
}
posicion++;
}
answer(s, d);
}
# | 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... |