Submission #145273

#TimeUsernameProblemLanguageResultExecution timeMemory
145273beso123Lost in the cycle (IOI19_cycle)C++14
Compilation error
0 ms0 KiB
#include<bits/stdc++.h> #include "cycle.h" #define int long long using namespace std; /*bool jump(int x) { p = (p + x) % n; cout<<p<<endl; return (n - p) % n <= n / 2; }*/ void escape(int n){ int l=0,r=0; if(jump(0)){ l=0; r=n/2; } else{ l=n/2+1; r=n-1; } int h=0; while(r-l>1){ int mid=((l+r)/2)+h; h=n-(l+r)/2; if(jump(mid)) l=(l+r)/2; else r=(l+r)/2; } if(jump(h+r)) return; h=n-r; jump(h+l); return; }

Compilation message (stderr)

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