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;
int tryCombination(int S[]);
void answer(int S[],int D[]);
void exploreCave(int N){
int D[N],S[N],w=0;
//int S_2[N];
// 0 0 0 0 0
// 1 1 1 1 1
// 1 1 1 1 0
//1110
//3102
for (int i=0; i<N; i++){
w = tryCombination(S);
if(w==-1) break;
if (w > i) continue;
for (int j=0; j<N; j++){
S[j] = (S[j]+1)%2;
w = tryCombination(S);
if(w==-1) break;
if (w>i) break;
S[j] = (S[j]+1)%2;
}
}
for (int i=0; i<N; i++){
S[i] = (S[i]+1)%2;
D[i] = tryCombination(S);
S[i] = (S[i]+1)%2;
}
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... |