dreaming.cpp: In function 'void dfs(int, int, int, std::pair<int, int>&)':
dreaming.cpp:14:32: error: cannot convert 'std::pair<int, int>' to 'int' in initialization
for(int vertice:adj[node]){
^
dreaming.cpp: In function 'bool find(int, int, int, std::vector<int>&)':
dreaming.cpp:29:18: error: cannot convert 'std::pair<int, int>' to 'int' in initialization
for(int v:adj[s]){
^
dreaming.cpp:31:19: error: 'u' was not declared in this scope
if(find(v,e,u,path)){
^
dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:55:20: error: cannot convert 'std::pair<int, int>' to 'int' for argument '3' to 'void dfs(int, int, int, std::pair<int, int>&)'
dfs(i,-1,s);
^
dreaming.cpp:57:25: error: cannot convert 'std::pair<int, int>' to 'int' for argument '3' to 'void dfs(int, int, int, std::pair<int, int>&)'
dfs(s.first,0,e);
^
dreaming.cpp:40:6: warning: unused variable 'm' [-Wunused-variable]
int m=M;
^
In file included from /usr/include/c++/7/algorithm:62:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:65,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_algo.h: In instantiation of '_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = int; _Predicate = __gnu_cxx::__ops::_Iter_equals_val<const std::vector<int> >]':
/usr/include/c++/7/bits/stl_algo.h:3907:28: required from '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = int; _Tp = std::vector<int>]'
dreaming.cpp:60:27: required from here
/usr/include/c++/7/bits/stl_algo.h:162:34: error: no matching function for call to '__iterator_category(int&)'
std::__iterator_category(__first));
~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~
In file included from /usr/include/c++/7/bits/stl_algobase.h:65:0,
from /usr/include/c++/7/bits/char_traits.h:39,
from /usr/include/c++/7/ios:40,
from /usr/include/c++/7/istream:38,
from /usr/include/c++/7/sstream:38,
from /usr/include/c++/7/complex:45,
from /usr/include/c++/7/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:52,
from dreaming.cpp:2:
/usr/include/c++/7/bits/stl_iterator_base_types.h:205:5: note: candidate: template<class _Iter> constexpr typename std::iterator_traits<_Iterator>::iterator_category std::__iterator_category(const _Iter&)
__iterator_category(const _Iter&)
^~~~~~~~~~~~~~~~~~~
/usr/include/c++/7/bits/stl_iterator_base_types.h:205:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/stl_iterator_base_types.h: In substitution of 'template<class _Iter> constexpr typename std::iterator_traits<_Iterator>::iterator_category std::__iterator_category(const _Iter&) [with _Iter = int]':
/usr/include/c++/7/bits/stl_algo.h:162:34: required from '_Iterator std::__find_if(_Iterator, _Iterator, _Predicate) [with _Iterator = int; _Predicate = __gnu_cxx::__ops::_Iter_equals_val<const std::vector<int> >]'
/usr/include/c++/7/bits/stl_algo.h:3907:28: required from '_IIter std::find(_IIter, _IIter, const _Tp&) [with _IIter = int; _Tp = std::vector<int>]'
dreaming.cpp:60:27: required from here
/usr/include/c++/7/bits/stl_iterator_base_types.h:205:5: error: no type named 'iterator_category' in 'struct std::iterator_traits<int>'