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;
int tryCombination(int S[]);
void answer(int S[], int D[]);
void exploreCave(int N)
{
int S[N];
int D[N];
for(int i = 0; i<N; i++)
{
S[i] = 0;
D[i] = i;
}
int temp = tryCombination(S);
if(temp==-1)
{
for(int i = 0; i<N; i++)
{
S[i] = 1;
int door = tryCombination(S);
S[i] = 0;
D[i] = door;
}
answer(S, D);
}
else
{
int curr = temp;
while(curr!=-1)
{
S[curr] = 1;
curr = tryCombination(S);
}
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... |