Submission #957265

# Submission time Handle Problem Language Result Execution time Memory
957265 2024-04-03T10:58:58 Z DeltaStruct Lost in the cycle (IOI19_cycle) C++17
Compilation error
0 ms 0 KB
#include "cycle.h"
#include <bits/stdc++.h>
using namespace std;
#define int long long
void escape(int n){
  if (n==2){ jump(1); return; }
  int ret = jump(n/2); if (ret==false) assert(jump(n/2));
  int l = 0,r = n/2+1,mid,now = 0,nxt;
  while(abs(l-r)>1){
    mid=(l+r)/2,nxt=(now+n-1)/n*n+mid,ret=jump((nxt-now)%n),now=nxt;
    if (ret) l = mid;
    else r = mid;
    now = nxt;
  }
  nxt=(now+n-1)/n*n+l,ret=jump((nxt-now)%n);
}

Compilation message

/usr/bin/ld: /tmp/ccqdw5U0.o: in function `main':
grader.cpp:(.text.startup+0x15b): undefined reference to `escape(int)'
collect2: error: ld returned 1 exit status