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 ;
void exploreCave(int N) {
int com[N] , ans[N];
memset(com , 0 , sizeof com);
for(int i = 1 ; i < N ; i ++){
com[i - 1] = 0 ;
com[i] = 0 ;
int c = tryCombination(com);
com[i] = 1 ;
int c2 = tryCombination(com);
if(c == c2)
ans[i - 1] = c , com[i - 1] = 1 ;
else {
com[i - 1] = 1 ;
ans[i - 1] = tryCombination(com);
com[i - 1] = 0 ;
}
}
com[N - 1] = 1 ;
int c = tryCombination(com);
if(c == -1){
com[N - 1] = 0 ;
ans[N - 1] = tryCombination(com);
com[N - 1] = 1 ;
}
else {
ans[N - 1] = c ;
com[N - 1] = 0 ;
}
answer(com , ans);
}
# | 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... |