dreaming.cpp: In function 'bool fn(int, int, int, std::vector<int>&)':
dreaming.cpp:31:19: error: 'u' was not declared in this scope
if(fn(v.x,e,u,path)){
^
dreaming.cpp:32:28: error: no matching function for call to 'std::vector<int>::push_back(std::pair<int, int>&)'
path.push_back(v);
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:939:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(const value_type&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(const value_type& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:939:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'const value_type& {aka const int&}'
/usr/include/c++/7/bits/stl_vector.h:953:7: note: candidate: void std::vector<_Tp, _Alloc>::push_back(std::vector<_Tp, _Alloc>::value_type&&) [with _Tp = int; _Alloc = std::allocator<int>; std::vector<_Tp, _Alloc>::value_type = int]
push_back(value_type&& __x)
^~~~~~~~~
/usr/include/c++/7/bits/stl_vector.h:953:7: note: no known conversion for argument 1 from 'std::pair<int, int>' to 'std::vector<int>::value_type&& {aka int&&}'
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:60:25: error: cannot convert 'std::vector<int>' to 'int' for argument '3' to 'bool fn(int, int, int, std::vector<int>&)'
fn(s.x,e.x,path);
^
dreaming.cpp:40:6: warning: unused variable 'm' [-Wunused-variable]
int m=M;
^