# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1132168 | totoro | Lost in the cycle (IOI19_cycle) | C++20 | 0 ms | 396 KiB |
#include "cycle.h"
int N;
inline int back(int k) {
return N-k;
}
void escape(int n) {
N=n;
if (jump(0)) jump((n+1)/2);
int jumpsz = n/2;
bool can = false;
while (jumpsz) {
if (can) {
can = jump(back(jumpsz));
} else {
can = jump(jumpsz);
}
jumpsz >>= 1;
}
if (can) jump(n/2);
else jump(n/2+1);
}
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |