crocodile.cpp: In function 'int travel_plan(int, int, int (*)[2], int*, int, int*)':
crocodile.cpp:36:9: error: no match for 'operator[]' (operand types are 'std::vector<bool>' and 'std::pair<int, int>')
if(vis[u]) continue;
^
In file included from /usr/include/c++/7/vector:65:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from crocodile.cpp:1:
/usr/include/c++/7/bits/stl_bvector.h:856:5: note: candidate: std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::reference = std::_Bit_reference; std::vector<bool, _Alloc>::size_type = long unsigned int]
operator[](size_type __n)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:856:5: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<bool>::size_type {aka long unsigned int}'
/usr/include/c++/7/bits/stl_bvector.h:863:5: note: candidate: std::vector<bool, _Alloc>::const_reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) const [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::const_reference = bool; std::vector<bool, _Alloc>::size_type = long unsigned int]
operator[](size_type __n) const
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:863:5: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<bool>::size_type {aka long unsigned int}'
crocodile.cpp:37:6: error: no match for 'operator[]' (operand types are 'std::vector<bool>' and 'std::pair<int, int>')
vis[u]=true;
^
In file included from /usr/include/c++/7/vector:65:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from crocodile.cpp:1:
/usr/include/c++/7/bits/stl_bvector.h:856:5: note: candidate: std::vector<bool, _Alloc>::reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::reference = std::_Bit_reference; std::vector<bool, _Alloc>::size_type = long unsigned int]
operator[](size_type __n)
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:856:5: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<bool>::size_type {aka long unsigned int}'
/usr/include/c++/7/bits/stl_bvector.h:863:5: note: candidate: std::vector<bool, _Alloc>::const_reference std::vector<bool, _Alloc>::operator[](std::vector<bool, _Alloc>::size_type) const [with _Alloc = std::allocator<bool>; std::vector<bool, _Alloc>::const_reference = bool; std::vector<bool, _Alloc>::size_type = long unsigned int]
operator[](size_type __n) const
^~~~~~~~
/usr/include/c++/7/bits/stl_bvector.h:863:5: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<bool>::size_type {aka long unsigned int}'
crocodile.cpp:39:21: error: no match for 'operator[]' (operand types are 'int [n]' and 'std::pair<int, int>')
int Dist = actual[u] + v.s;
^