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 "cycle.h"
void escape(int n) {
int ncount = n;
int res = jump(0);
if(res == true)
{
res = jump(ncount / 2);
}
else
{
res = jump((n - ncount / 2)%n);
}
while(ncount > 1)
{
if(res==false)
{
ncount -= ncount / 2;
res = jump((n - ncount / 2)%n);
if (ncount == 1)
{
jump(n - 1);
}
}
else
{
ncount -= ncount / 2;
res = jump(ncount / 2);
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |