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 result[5002],match[5002],sent[5002];
bool iflastopen,fixed_[5002];
int N;
void change(int a, int b, bool c){
for(int i=a;i<=b;i++){
if(!fixed_[i])
sent[i]= c;
}
}
void exploreCave(int n){
N = n;
for(int j=0;j<n;j++){
change(0,n-1,0);
int p=tryCombination(sent);
if(!(p==j))
iflastopen=0;
else
iflastopen=1;
int pocz=j;
sent[pocz] = iflastopen;
match[j]=pocz;
fixed_[pocz]=1;
}
answer(sent,match);
}
# | 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... |