Submission #373677

#TimeUsernameProblemLanguageResultExecution timeMemory
373677Aryan_RainaLost in the cycle (IOI19_cycle)C++14
100 / 100
2 ms492 KiB
#include "cycle.h" #include<bits/stdc++.h> using namespace std; void escape(int n) { int j = log2(n); if ((n&(n-1)) == 0) j--; bool b = jump(1<<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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...