Submission #225901

#TimeUsernameProblemLanguageResultExecution timeMemory
225901pavementLost in the cycle (IOI19_cycle)C++17
Compilation error
0 ms0 KiB
#include <bits/stdc++.h>
using namespace std;

void escape(int n) {
	int cur = 0, lo = 0, hi = n - 1, ans = -1;
	while (lo <= hi) {
		int mid = (lo + hi) >> 1;
		bool x = jump(mid >= cur ? mid - cur : n - cur + mid);
		cur = mid;
		if (x) ans = mid, hi = mid - 1;
		else lo = mid + 1;
	}
	jump((ans >= cur ? ans - cur : n - cur + ans) + n / 2);
}

Compilation message (stderr)

cycle.cpp: In function 'void escape(int)':
cycle.cpp:8:12: error: 'jump' was not declared in this scope
   bool x = jump(mid >= cur ? mid - cur : n - cur + mid);
            ^~~~
cycle.cpp:8:12: note: suggested alternative: 'bcmp'
   bool x = jump(mid >= cur ? mid - cur : n - cur + mid);
            ^~~~
            bcmp
cycle.cpp:13:2: error: 'jump' was not declared in this scope
  jump((ans >= cur ? ans - cur : n - cur + ans) + n / 2);
  ^~~~
cycle.cpp:13:2: note: suggested alternative: 'bcmp'
  jump((ans >= cur ? ans - cur : n - cur + ans) + n / 2);
  ^~~~
  bcmp