Submission #976238

# Submission time Handle Problem Language Result Execution time Memory
976238 2024-05-06T10:45:21 Z HappyCapybara Lost in the cycle (IOI19_cycle) C++17
Compilation error
0 ms 0 KB
#include<bits/stdc++.h>
using namespace std;

void escape(int n){
    int l=0, r=n;
    int cur = 0;
    while (l < r-1){
        int m = (l+r)/2;
        if (jump((m-cur+n)%n)) l = m;
        else r = m;
    }
    jump((l-cur)%n);
    return;
}

Compilation message

cycle.cpp: In function 'void escape(int)':
cycle.cpp:9:13: error: 'jump' was not declared in this scope
    9 |         if (jump((m-cur+n)%n)) l = m;
      |             ^~~~
cycle.cpp:12:5: error: 'jump' was not declared in this scope
   12 |     jump((l-cur)%n);
      |     ^~~~