books.cpp: In function 'long long int minimun_walk(std::vector<int>, int)':
books.cpp:18:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < p.size(); i ++) boss[i] = i;
~~^~~~~~~~~~
books.cpp:19:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < p.size(); i ++) sum += abs(i - p[i]), merge(i, p[i]);
~~^~~~~~~~~~
books.cpp:20:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < p.size(); i ++) pq[Find(i)].push(i);
~~^~~~~~~~~~
books.cpp:22:19: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0; i < p.size(); i ++) {
~~^~~~~~~~~~
books.cpp:43:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
/tmp/ccm471B3.o: In function `main':
grader.cpp:(.text.startup+0x23a): undefined reference to `minimum_walk(std::vector<int, std::allocator<int> >, int)'
collect2: error: ld returned 1 exit status