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 S[5001],D[5001];
bool used[5001];
void exploreCave(int N) {
for (int i = 0; i < N; ++i) {
int prevState = tryCombination(S);
for(int j = 0 ; j < N ; j++){
if(used[j])
continue;
S[j] = 1;
int atm = tryCombination(S);
if(prevState == i && atm != i){
used[j]= 1;
S[j] =1;
D[j] = i;
break;
}
if(prevState != i && atm == i){
used[j] = 1;
S[j] = 0;
D[j] = i;
break;
}
S[j] = 0;
}
}
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... |