| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 348015 | laoriu | Lost in the cycle (IOI19_cycle) | C++14 | 1 ms | 364 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 "cycle.h"
#include <bits/stdc++.h>
using namespace std;
void escape(int n) {
    if (n == 2) {
        jump(1); return;
    }
    int lo, hi;
    if (jump(0)) {
        lo = (n + 1) / 2; hi = n - 1;
    }
    else {
        lo = 1; hi = (n + 1) / 2 - 1;
    }
    int pre = 0, res;
    while (lo <= hi) {
        int mi = (lo + hi) / 2;
        if (jump((pre + n - mi) % n))
            hi = mi - 1;
        else lo = mi + 1;
        pre = mi;
    }
}
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... | ||||
