rail.cpp: In function 'void findLocation(int, int, int*, int*)':
rail.cpp:18:7: warning: unused variable 'curCost' [-Wunused-variable]
18 | int curCost = pq.top().first, a = pq.top().second.first, b = pq.top().second.second;
| ^~~~~~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from rail.cpp:2:
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Iter_comp_val<_Compare>::operator()(_Iterator, _Value&) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<int, std::pair<int, int> >*, std::vector<std::pair<int, std::pair<int, int> > > >; _Value = std::pair<int, std::pair<int, int> >; _Compare = std::greater<std::pair<int, int> >]':
/usr/include/c++/10/bits/stl_heap.h:139:48: required from 'void std::__push_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, std::pair<int, int> >*, std::vector<std::pair<int, std::pair<int, int> > > >; _Distance = long int; _Tp = std::pair<int, std::pair<int, int> >; _Compare = __gnu_cxx::__ops::_Iter_comp_val<std::greater<std::pair<int, int> > >]'
/usr/include/c++/10/bits/stl_heap.h:215:23: required from 'void std::push_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, std::pair<int, int> >*, std::vector<std::pair<int, std::pair<int, int> > > >; _Compare = std::greater<std::pair<int, int> >]'
/usr/include/c++/10/bits/stl_queue.h:651:16: required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::push(std::priority_queue<_Tp, _Sequence, _Compare>::value_type&&) [with _Tp = std::pair<int, std::pair<int, int> >; _Sequence = std::vector<std::pair<int, std::pair<int, int> > >; _Compare = std::greater<std::pair<int, int> >; std::priority_queue<_Tp, _Sequence, _Compare>::value_type = std::pair<int, std::pair<int, int> >]'
rail.cpp:16:49: required from here
/usr/include/c++/10/bits/predefined_ops.h:194:23: error: no match for call to '(std::greater<std::pair<int, int> >) (std::pair<int, std::pair<int, int> >&, std::pair<int, std::pair<int, int> >&)'
194 | { return bool(_M_comp(*__it, __val)); }
| ~~~~~~~^~~~~~~~~~~~~~
In file included from /usr/include/c++/10/string:48,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from rail.cpp:2:
/usr/include/c++/10/bits/stl_function.h:375:7: note: candidate: 'constexpr bool std::greater<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = std::pair<int, int>]'
375 | operator()(const _Tp& __x, const _Tp& __y) const
| ^~~~~~~~
/usr/include/c++/10/bits/stl_function.h:375:29: note: no known conversion for argument 1 from 'std::pair<int, std::pair<int, int> >' to 'const std::pair<int, int>&'
375 | operator()(const _Tp& __x, const _Tp& __y) const
| ~~~~~~~~~~~^~~
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
from /usr/include/c++/10/bits/char_traits.h:39,
from /usr/include/c++/10/ios:40,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from rail.cpp:2:
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'constexpr bool __gnu_cxx::__ops::_Iter_comp_iter<_Compare>::operator()(_Iterator1, _Iterator2) [with _Iterator1 = __gnu_cxx::__normal_iterator<std::pair<int, std::pair<int, int> >*, std::vector<std::pair<int, std::pair<int, int> > > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::pair<int, std::pair<int, int> >*, std::vector<std::pair<int, std::pair<int, int> > > >; _Compare = std::greater<std::pair<int, int> >]':
/usr/include/c++/10/bits/stl_heap.h:231:14: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, std::pair<int, int> >*, std::vector<std::pair<int, std::pair<int, int> > > >; _Distance = long int; _Tp = std::pair<int, std::pair<int, int> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<std::pair<int, int> > >]'
/usr/include/c++/10/bits/stl_heap.h:263:25: required from 'void std::__pop_heap(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<int, std::pair<int, int> >*, std::vector<std::pair<int, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<std::greater<std::pair<int, int> > >]'
/usr/include/c++/10/bits/stl_heap.h:332:19: required from 'void std::pop_heap(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<int, std::pair<int, int> >*, std::vector<std::pair<int, std::pair<int, int> > > >; _Compare = std::greater<std::pair<int, int> >]'
/usr/include/c++/10/bits/stl_queue.h:678:15: required from 'void std::priority_queue<_Tp, _Sequence, _Compare>::pop() [with _Tp = std::pair<int, std::pair<int, int> >; _Sequence = std::vector<std::pair<int, std::pair<int, int> > >; _Compare = std::greater<std::pair<int, int> >]'
rail.cpp:19:10: required from here
/usr/include/c++/10/bits/predefined_ops.h:156:30: error: no match for call to '(std::greater<std::pair<int, int> >) (std::pair<int, std::pair<int, int> >&, std::pair<int, std::pair<int, int> >&)'
156 | { return bool(_M_comp(*__it1, *__it2)); }
| ~~~~~~~^~~~~~~~~~~~~~~~
In file included from /usr/include/c++/10/string:48,
from /usr/include/c++/10/bits/locale_classes.h:40,
from /usr/include/c++/10/bits/ios_base.h:41,
from /usr/include/c++/10/ios:42,
from /usr/include/c++/10/istream:38,
from /usr/include/c++/10/sstream:38,
from /usr/include/c++/10/complex:45,
from /usr/include/c++/10/ccomplex:39,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:54,
from rail.cpp:2:
/usr/include/c++/10/bits/stl_function.h:375:7: note: candidate: 'constexpr bool std::greater<_Tp>::operator()(const _Tp&, const _Tp&) const [with _Tp = std::pair<int, int>]'
375 | operator()(const _Tp& __x, const _Tp& __y) const
| ^~~~~~~~
/usr/include/c++/10/bits/stl_function.h:375:29: note: no known conversion for argument 1 from 'std::pair<int, std::pair<int, int> >' to 'const std::pair<int, int>&'
375 | operator()(const _Tp& __x, const _Tp& __y) const
| ~~~~~~~~~~~^~~