# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
225784 | Blerargh | Lost in the cycle (IOI19_cycle) | C++17 | 5 ms | 384 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"
using namespace std;
void escape(int n){
bool chk;
int half = n/2;
if (!jump(half)){
chk = jump(n-half);
}
int l=0, r=half, prevjump=n;
while (l<r){
int mid = (l+r)/2;
int tojump = mid+n-prevjump;
if (tojump>=n) chk=jump(n-prevjump), prevjump=n;
if (jump(mid+n-prevjump)) l=mid;
else r=mid-1;
prevjump = mid;
}
chk = jump(l+n-prevjump);
return;
}
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... |