crocodile.cpp: In function 'int travel_plan(int, int, int (*)[2], int*, int, int*)':
crocodile.cpp:13:41: warning: overflow in implicit constant conversion [-Woverflow]
memset(dist, 0x3f3f3f3f3f, sizeof(dist));
^
crocodile.cpp:25:21: error: 'k' was not declared in this scope
for(int i = 0; i < k; i++)
^
crocodile.cpp:27:8: error: 'p' was not declared in this scope
dist[p[i]] = 0;
^
crocodile.cpp:29:19: error: no matching function for call to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::push(<brace-enclosed initializer list>)'
q.push({0, p[i]});
^
In file included from /usr/include/c++/7/queue:64:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from crocodile.cpp:1:
/usr/include/c++/7/bits/stl_queue.h:595:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(const value_type&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
push(const value_type& __x)
^~~~
/usr/include/c++/7/bits/stl_queue.h:595:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const value_type& {aka const std::pair<int, int>&}'
/usr/include/c++/7/bits/stl_queue.h:603:7: note: candidate: void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, int>; _Sequence = std::vector<std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, int>]
push(value_type&& __x)
^~~~
/usr/include/c++/7/bits/stl_queue.h:603:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::priority_queue<std::pair<int, int>, std::vector<std::pair<int, int> >, std::greater<std::pair<int, int> > >::value_type&& {aka std::pair<int, int>&&}'