# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1132173 | 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;
int jumpsz = n/2;
bool can = jump(0);
while (jumpsz) {
if (can) {
can = jump(jumpsz);
} else {
can = jump(back(jumpsz));
}
if (jumpsz == 1) jumpsz = 0;
jumpsz = (jumpsz+1)/2;
}
if (!can) jump(back(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... |