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 "cycle.h"
#include <iostream>
void escape(int n) {
long long N = (long long) n;
long long l = 0, r = N, offset = 0, curr = 0;
while (l != r) {
long long mid = (l + r) / 2;
curr = (curr + mid + offset) % N;
if (jump((mid + offset) % N)) r = mid;
else l = mid + 1;
offset = N - mid;
}
jump((N / 2 + l + offset) % N);
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |