prize.cpp: In function 'long long int minimum_walk(std::vector<int>, int)':
prize.cpp:22:21: warning: variable 'pre' set but not used [-Wunused-but-set-variable]
22 | for(int pre=i, j = p[i]; j != i; pre=j, j = p[j]) {
| ^~~
prize.cpp:5:41: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
5 | #define REP(i, a, b) for(int i = (a); i < (b); ++i)
| ^
prize.cpp:38:17: note: in expansion of macro 'REP'
38 | REP(ci, 1, els.size()) tot += abs(els[ci] - els[ci-1]);
| ^~~
/usr/bin/ld: /tmp/ccTImP5u.o: in function `main':
grader.cpp:(.text.startup+0x98): undefined reference to `find_best(int)'
collect2: error: ld returned 1 exit status