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"
#include<bits/stdc++.h>
using namespace std;
void escape(int n) {
int j = log2(n);
bool b = jump(j);
while (true) {
// cout<<j<<" "<<b<<endl;
if (b) {
j--;
if (j < 0) return;
b = jump(1<<j);
} else {
j--;
if (j < 0) {
b = jump(n - (1<<(j+1)));
return;
}
b = jump(n - (1<<(j+1)) + (1<<j));
}
}
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |