Submission #374006

# Submission time Handle Problem Language Result Execution time Memory
374006 2021-03-06T12:15:24 Z vishesh312 Lost in the cycle (IOI19_cycle) C++17
Compilation error
0 ms 0 KB
#include "bits/stdc++.h"
#include "cycle.h"
using namespace std;
#define int long long
void escape(int n) {
    int lo = 1, hi = n;
    int a = 0, cur = 0;
    while (lo < hi) {
       int mid = lo + (hi-lo) / 2;
       cur += (mid + a);
       cur %= n;
       if (jump((mid + a) % n)) {
           hi = mid;
       } else {
           lo = mid+1;
       }
       a = n - mid;
    }
    jump((n/2 + lo + a) % n);
}

Compilation message

/tmp/ccwm0ibc.o: In function `main':
grader.cpp:(.text.startup+0x178): undefined reference to `escape(int)'
collect2: error: ld returned 1 exit status