# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
228622 | huangqr | Lost in the cycle (IOI19_cycle) | C++14 | 5 ms | 416 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<bits/stdc++.h>
#include "cycle.h"
void escape(int n) {
int x=floor(log2(n)),r=0,a=0,to_jump;
for(int i=x;i>=0;i--){
int t=(1<<i);
to_jump=(r+t)%n;
bool yn=jump(to_jump);
if(yn){
// cerr<<"Jump "<<to_jump<<" yes, r=0\n";
r=0;
}
else{
// cerr<<"Jump "<<to_jump<<" no, r="<<n-t<<"\n";
r=n-t;
}
}
jump(r);
}
Compilation message (stderr)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |