crocodile.cpp: In function 'int dfs(int)':
crocodile.cpp:48:18: error: no matching function for call to 'begin(std::pair<int, int>&)'
for(auto u:adj[v])
^
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/bits/range_access.h:105:37: note: candidate: template<class _Tp> const _Tp* std::begin(const std::valarray<_Tp>&)
template<typename _Tp> const _Tp* begin(const valarray<_Tp>&);
^~~~~
/usr/include/c++/7/bits/range_access.h:105:37: note: template argument deduction/substitution failed:
crocodile.cpp:48:18: note: 'std::pair<int, int>' is not derived from 'const std::valarray<_Tp>'
for(auto u:adj[v])
^
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/bits/range_access.h:104:31: note: candidate: template<class _Tp> _Tp* std::begin(std::valarray<_Tp>&)
template<typename _Tp> _Tp* begin(valarray<_Tp>&);
^~~~~
/usr/include/c++/7/bits/range_access.h:104:31: note: template argument deduction/substitution failed:
crocodile.cpp:48:18: note: 'std::pair<int, int>' is not derived from 'std::valarray<_Tp>'
for(auto u:adj[v])
^
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/bits/range_access.h:87:5: note: candidate: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::begin(_Tp (&)[_Nm])
begin(_Tp (&__arr)[_Nm])
^~~~~
/usr/include/c++/7/bits/range_access.h:87:5: note: template argument deduction/substitution failed:
crocodile.cpp:48:18: note: mismatched types '_Tp [_Nm]' and 'std::pair<int, int>'
for(auto u:adj[v])
^
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/bits/range_access.h:58:5: note: candidate: template<class _Container> decltype (__cont.begin()) std::begin(const _Container&)
begin(const _Container& __cont) -> decltype(__cont.begin())
^~~~~
/usr/include/c++/7/bits/range_access.h:58:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(const _Container&) [with _Container = std::pair<int, int>]':
crocodile.cpp:48:18: required from here
/usr/include/c++/7/bits/range_access.h:58:56: error: 'const struct std::pair<int, int>' has no member named 'begin'
begin(const _Container& __cont) -> decltype(__cont.begin())
~~~~~~~^~~~~
/usr/include/c++/7/bits/range_access.h:48:5: note: candidate: template<class _Container> decltype (__cont.begin()) std::begin(_Container&)
begin(_Container& __cont) -> decltype(__cont.begin())
^~~~~
/usr/include/c++/7/bits/range_access.h:48:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.begin()) std::begin(_Container&) [with _Container = std::pair<int, int>]':
crocodile.cpp:48:18: required from here
/usr/include/c++/7/bits/range_access.h:48:50: error: 'struct std::pair<int, int>' has no member named 'begin'
begin(_Container& __cont) -> decltype(__cont.begin())
~~~~~~~^~~~~
In file included from /usr/include/c++/7/bits/range_access.h:36:0,
from /usr/include/c++/7/string:51,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/initializer_list:89:5: note: candidate: template<class _Tp> constexpr const _Tp* std::begin(std::initializer_list<_Tp>)
begin(initializer_list<_Tp> __ils) noexcept
^~~~~
/usr/include/c++/7/initializer_list:89:5: note: template argument deduction/substitution failed:
crocodile.cpp:48:18: note: 'std::pair<int, int>' is not derived from 'std::initializer_list<_Tp>'
for(auto u:adj[v])
^
crocodile.cpp:48:18: error: no matching function for call to 'end(std::pair<int, int>&)'
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/bits/range_access.h:107:37: note: candidate: template<class _Tp> const _Tp* std::end(const std::valarray<_Tp>&)
template<typename _Tp> const _Tp* end(const valarray<_Tp>&);
^~~
/usr/include/c++/7/bits/range_access.h:107:37: note: template argument deduction/substitution failed:
crocodile.cpp:48:18: note: 'std::pair<int, int>' is not derived from 'const std::valarray<_Tp>'
for(auto u:adj[v])
^
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/bits/range_access.h:106:31: note: candidate: template<class _Tp> _Tp* std::end(std::valarray<_Tp>&)
template<typename _Tp> _Tp* end(valarray<_Tp>&);
^~~
/usr/include/c++/7/bits/range_access.h:106:31: note: template argument deduction/substitution failed:
crocodile.cpp:48:18: note: 'std::pair<int, int>' is not derived from 'std::valarray<_Tp>'
for(auto u:adj[v])
^
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/bits/range_access.h:97:5: note: candidate: template<class _Tp, long unsigned int _Nm> constexpr _Tp* std::end(_Tp (&)[_Nm])
end(_Tp (&__arr)[_Nm])
^~~
/usr/include/c++/7/bits/range_access.h:97:5: note: template argument deduction/substitution failed:
crocodile.cpp:48:18: note: mismatched types '_Tp [_Nm]' and 'std::pair<int, int>'
for(auto u:adj[v])
^
In file included from /usr/include/c++/7/string:51:0,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/bits/range_access.h:78:5: note: candidate: template<class _Container> decltype (__cont.end()) std::end(const _Container&)
end(const _Container& __cont) -> decltype(__cont.end())
^~~
/usr/include/c++/7/bits/range_access.h:78:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(const _Container&) [with _Container = std::pair<int, int>]':
crocodile.cpp:48:18: required from here
/usr/include/c++/7/bits/range_access.h:78:54: error: 'const struct std::pair<int, int>' has no member named 'end'; did you mean 'second'?
end(const _Container& __cont) -> decltype(__cont.end())
~~~~~~~^~~
second
/usr/include/c++/7/bits/range_access.h:68:5: note: candidate: template<class _Container> decltype (__cont.end()) std::end(_Container&)
end(_Container& __cont) -> decltype(__cont.end())
^~~
/usr/include/c++/7/bits/range_access.h:68:5: note: template argument deduction/substitution failed:
/usr/include/c++/7/bits/range_access.h: In substitution of 'template<class _Container> decltype (__cont.end()) std::end(_Container&) [with _Container = std::pair<int, int>]':
crocodile.cpp:48:18: required from here
/usr/include/c++/7/bits/range_access.h:68:48: error: 'struct std::pair<int, int>' has no member named 'end'; did you mean 'second'?
end(_Container& __cont) -> decltype(__cont.end())
~~~~~~~^~~
second
In file included from /usr/include/c++/7/bits/range_access.h:36:0,
from /usr/include/c++/7/string:51,
from /usr/include/c++/7/bits/locale_classes.h:40,
from /usr/include/c++/7/bits/ios_base.h:41,
from /usr/include/c++/7/ios:42,
from /usr/include/c++/7/ostream:38,
from /usr/include/c++/7/iostream:39,
from crocodile.cpp:2:
/usr/include/c++/7/initializer_list:99:5: note: candidate: template<class _Tp> constexpr const _Tp* std::end(std::initializer_list<_Tp>)
end(initializer_list<_Tp> __ils) noexcept
^~~
/usr/include/c++/7/initializer_list:99:5: note: template argument deduction/substitution failed:
crocodile.cpp:48:18: note: 'std::pair<int, int>' is not derived from 'std::initializer_list<_Tp>'
for(auto u:adj[v])
^
crocodile.cpp: In function 'int travel_plan(int, int, int (*)[2], int*, int, int*)':
crocodile.cpp:70:16: error: 'struct std::pair<int, int>' has no member named 'push_back'
adj[R[i][0]].push_back(make_pair(R[i][1],L[i]));
^~~~~~~~~
crocodile.cpp:71:16: error: 'struct std::pair<int, int>' has no member named 'push_back'
adj[R[i][1]].push_back(make_pair(R[i][0],L[i]));
^~~~~~~~~