| # | Time | Username | Problem | Language | Result | Execution time | Memory | 
|---|---|---|---|---|---|---|---|
| 490872 | niloyroot | Lost in the cycle (IOI19_cycle) | C++14 | 0 ms | 0 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>
using namespace std;
using ll = long long;
using vi = vector<ll>;
using pl = pair<ll,ll>;
#define pb push_back
#define form(m,it) for(auto it=m.begin(); it!=m.end(); it++)
#define forp(i,a,b) for(ll i=a; i<=b; i++)
#define forn(i,a,b) for(ll i=a; i>=b; i--)
#define newl '\n'
#define ff first
#define ss second
const ll mod = 1000000007;
void escape(int n){
    ll len=1;
    while(len<n){
        len*=2;
    }
    len/=2;
    bool g=1;
    while(len>=1){
        if(g){
            g=jump(len);
        } else {
            g=jump(n-len);
        }
        len/=2;
    }
    jump(1);
    if(jump(n-1)){
        return;
    } else {
        jump(n-1);
    }
}
