Submission #1132173

#TimeUsernameProblemLanguageResultExecution timeMemory
1132173totoroLost in the cycle (IOI19_cycle)C++20
100 / 100
0 ms396 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...