Submission #569861

#TimeUsernameProblemLanguageResultExecution timeMemory
569861Aurora2005Lost in the cycle (IOI19_cycle)C++14
100 / 100
1 ms292 KiB
#include<bits/stdc++.h> #include"cycle.h" using namespace std; void escape(int N){ int l=0,r=N,p=0; while(r-l != 1 && (l != N-1 || r != 0)){ int L = l; int R = r; if(L > R) R += N; int M = (L+R)/2; int d = N-N/2-M; if(d < 0) d += 2*N; d %= N; p += d; p %= N; if(jump(d)){ l = M; l += d; r += d; l %= N; r %= N; } else{ r = M; l += d; r += d; l %= N; r %= N; } } int now = l; now %= N; if(now != 0) jump(N-now); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...