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"
int check[5000], s[5000], d[5000];
void exploreCave(int N) {
int i, open=0, x;
while(open>=0)
{
for(i=0 ; i<N ; i++)
if(check[i]==0)
{
s[i]=1-s[i];
x=tryCombination(s);
if(x==-1)
{
open=x;
break;
}
if(open!=x)
{
check[i]=1;
if(open<x)
{
open=x;
break;
}
}
else
s[i]=1-s[i];
}
}
for(i=0 ; i<N ; i++)
{
s[i]=1-s[i];
d[i]=tryCombination(s);
s[i]=1-s[i];
}
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... |