highway.cpp: In function 'void dfs_tree(int)':
highway.cpp:32:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (int i = 0; i < adj[node].size(); ++i)
~~^~~~~~~~~~~~~~~~~~
highway.cpp: In function 'void find_pair(int, std::vector<int>, std::vector<int>, int, int)':
highway.cpp:65:7: warning: unused variable 'kal1' [-Wunused-variable]
int kal1 = kal.second;
^~~~
highway.cpp:68:14: error: conflicting declaration 'std::vector<int> hi'
vector<int> hi = gg2[vol];
^~
highway.cpp:60:23: note: previous declaration as 'std::vector<std::pair<int, int> > hi'
vector<pair<int,int>>hi;
^~
highway.cpp:76:49: error: no matching function for call to 'std::map<std::pair<int, int>, int>::lower_bound(<brace-enclosed initializer list>)'
auto voli = gg.lower_bound({hi[i],-INF});
^
In file included from /usr/include/c++/7/map:61:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:81,
from highway.cpp:2:
/usr/include/c++/7/bits/stl_map.h:1233:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare, _Alloc>::lower_bound(const key_type&) [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::iterator = std::_Rb_tree_iterator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]
lower_bound(const key_type& __x)
^~~~~~~~~~~
/usr/include/c++/7/bits/stl_map.h:1233:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<int, int>&}'
/usr/include/c++/7/bits/stl_map.h:1239:2: note: candidate: template<class _Kt> decltype ((std::map<_Key, _Tp, _Compare, _Alloc>::iterator)(((std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_lower_bound_tr(__x))) std::map<_Key, _Tp, _Compare, _Alloc>::lower_bound(const _Kt&) [with _Kt = _Kt; _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]
lower_bound(const _Kt& __x)
^~~~~~~~~~~
/usr/include/c++/7/bits/stl_map.h:1239:2: note: template argument deduction/substitution failed:
highway.cpp:76:49: note: couldn't deduce template parameter '_Kt'
auto voli = gg.lower_bound({hi[i],-INF});
^
In file included from /usr/include/c++/7/map:61:0,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:81,
from highway.cpp:2:
/usr/include/c++/7/bits/stl_map.h:1258:7: note: candidate: std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator std::map<_Key, _Tp, _Compare, _Alloc>::lower_bound(const key_type&) const [with _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator = std::_Rb_tree_const_iterator<std::pair<const std::pair<int, int>, int> >; std::map<_Key, _Tp, _Compare, _Alloc>::key_type = std::pair<int, int>]
lower_bound(const key_type& __x) const
^~~~~~~~~~~
/usr/include/c++/7/bits/stl_map.h:1258:7: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'const key_type& {aka const std::pair<int, int>&}'
/usr/include/c++/7/bits/stl_map.h:1264:2: note: candidate: template<class _Kt> decltype ((std::map<_Key, _Tp, _Compare, _Alloc>::const_iterator)(((const std::map<_Key, _Tp, _Compare, _Alloc>*)this)->std::map<_Key, _Tp, _Compare, _Alloc>::_M_t._M_lower_bound_tr(__x))) std::map<_Key, _Tp, _Compare, _Alloc>::lower_bound(const _Kt&) const [with _Kt = _Kt; _Key = std::pair<int, int>; _Tp = int; _Compare = std::less<std::pair<int, int> >; _Alloc = std::allocator<std::pair<const std::pair<int, int>, int> >]
lower_bound(const _Kt& __x) const
^~~~~~~~~~~
/usr/include/c++/7/bits/stl_map.h:1264:2: note: template argument deduction/substitution failed:
highway.cpp:76:49: note: couldn't deduce template parameter '_Kt'
auto voli = gg.lower_bound({hi[i],-INF});
^
highway.cpp:80:13: error: cannot convert '__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> > >::value_type {aka std::pair<int, int>}' to 'int' in assignment
last=hi[i];
^