Submission #374008

#TimeUsernameProblemLanguageResultExecution timeMemory
374008vishesh312Lost in the cycle (IOI19_cycle)C++17
33 / 100
1 ms364 KiB
#include "bits/stdc++.h" #include "cycle.h" using namespace std; void escape(int N) { long long n = N; long long lo = 1, hi = n; long long a = 0, cur = 0; while (lo < hi) { long long mid = lo + (hi-lo) / 2; cur += (mid + a); cur %= n; if (jump((mid + a) % n)) { hi = mid; } else { lo = mid+1; } a = n - mid; } jump((n/2 + lo + a) % n); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...