Submission #490873

#TimeUsernameProblemLanguageResultExecution timeMemory
490873niloyrootLost in the cycle (IOI19_cycle)C++14
100 / 100
2 ms200 KiB
#include <bits/stdc++.h>
#include "cycle.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);
    }
}
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...