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;
typedef long long ll;
typedef long double ld;
#define rep(a, b) for(int a = 0; a < (b); ++a)
#define st first
#define nd second
#define pb push_back
#define all(a) a.begin(), a.end()
void escape(int n) {
	bool x=jump(0);
	if(x) x=jump((n-1)/2);
	while(x) x=jump(1);
	int akt=n-1;
	int po=n-(n-1)/2, ko=n-1;
	while(po<ko) {
		int sr=(po+ko)/2;
		x=jump((sr-akt+n)%n);
		akt=sr;
		if(x) po=sr+1; else ko=sr;
	}
	jump((po-1-akt+2*n)%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... |