Submission #228620

#TimeUsernameProblemLanguageResultExecution timeMemory
228620huangqrLost in the cycle (IOI19_cycle)C++14
0 / 100
5 ms256 KiB
#include<bits/stdc++.h> #include "cycle.h" void escape(int n) { int x=ceil(log2(n)),r=0,a=0,to_jump; for(int i=x;i>=0;i--){ int t=(1<<i); to_jump=r+t; bool yn=jump(to_jump); if(yn){ r=0; } else{ r=n-t; } } }

Compilation message (stderr)

cycle.cpp: In function 'void escape(int)':
cycle.cpp:5:26: warning: unused variable 'a' [-Wunused-variable]
  int x=ceil(log2(n)),r=0,a=0,to_jump;
                          ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...