sortbooks.cpp:67:41: error: wrong number of template arguments (3, should be 2)
67 | bool cmp(pair<pair<int,int, pair<int,int>>> a, pair<pair<int,int, pair<int,int>>> b){
| ^~
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from sortbooks.cpp:3:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
211 | struct pair
| ^~~~
sortbooks.cpp:67:43: error: wrong number of template arguments (1, should be 2)
67 | bool cmp(pair<pair<int,int, pair<int,int>>> a, pair<pair<int,int, pair<int,int>>> b){
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from sortbooks.cpp:3:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
211 | struct pair
| ^~~~
sortbooks.cpp:67:79: error: wrong number of template arguments (3, should be 2)
67 | bool cmp(pair<pair<int,int, pair<int,int>>> a, pair<pair<int,int, pair<int,int>>> b){
| ^~
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from sortbooks.cpp:3:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
211 | struct pair
| ^~~~
sortbooks.cpp:67:81: error: wrong number of template arguments (1, should be 2)
67 | bool cmp(pair<pair<int,int, pair<int,int>>> a, pair<pair<int,int, pair<int,int>>> b){
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from sortbooks.cpp:3:
/usr/include/c++/10/bits/stl_pair.h:211:12: note: provided for 'template<class _T1, class _T2> struct std::pair'
211 | struct pair
| ^~~~
sortbooks.cpp: In function 'bool cmp(int, int)':
sortbooks.cpp:68:11: error: request for member 'first' in 'a', which is of non-class type 'int'
68 | return a.first.first > b.first.first;
| ^~~~~
sortbooks.cpp:68:27: error: request for member 'first' in 'b', which is of non-class type 'int'
68 | return a.first.first > b.first.first;
| ^~~~~
sortbooks.cpp: In function 'int main()':
sortbooks.cpp:94:24: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
94 | for(int x = idx; x < inv.size(); x++){
| ~~^~~~~~~~~~~~
sortbooks.cpp:91:9: warning: unused variable 'mx' [-Wunused-variable]
91 | int mx = 0;
| ^~
In file included from /usr/include/c++/10/bits/stl_algobase.h:71,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from sortbooks.cpp:3:
/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<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Iterator2 = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = bool (*)(int, int)]':
/usr/include/c++/10/bits/stl_algo.h:82:17: required from 'void std::__move_median_to_first(_Iterator, _Iterator, _Iterator, _Iterator, _Compare) [with _Iterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1924:34: required from '_RandomAccessIterator std::__unguarded_partition_pivot(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1958:38: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1974:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:4892:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = bool (*)(int, int)]'
sortbooks.cpp:120:37: required from here
/usr/include/c++/10/bits/predefined_ops.h:156:30: error: cannot convert 'std::pair<std::pair<int, int>, std::pair<int, int> >' to 'int' in argument passing
156 | { return bool(_M_comp(*__it1, *__it2)); }
| ~~~~~~~^~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/predefined_ops.h: In instantiation of 'bool __gnu_cxx::__ops::_Val_comp_iter<_Compare>::operator()(_Value&, _Iterator) [with _Value = std::pair<std::pair<int, int>, std::pair<int, int> >; _Iterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = bool (*)(int, int)]':
/usr/include/c++/10/bits/stl_algo.h:1826:20: required from 'void std::__unguarded_linear_insert(_RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Val_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1854:36: required from 'void std::__insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1886:25: required from 'void std::__final_insertion_sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1977:31: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:4892:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = bool (*)(int, int)]'
sortbooks.cpp:120:37: required from here
/usr/include/c++/10/bits/predefined_ops.h:238:23: error: cannot convert 'std::pair<std::pair<int, int>, std::pair<int, int> >' to 'int' in argument passing
238 | { return bool(_M_comp(__val, *__it)); }
| ~~~~~~~^~~~~~~~~~~~~~
/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<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Value = std::pair<std::pair<int, int>, std::pair<int, int> >; _Compare = bool (*)(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<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Distance = long int; _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Compare = __gnu_cxx::__ops::_Iter_comp_val<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_heap.h:246:23: required from 'void std::__adjust_heap(_RandomAccessIterator, _Distance, _Distance, _Tp, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Distance = long int; _Tp = std::pair<std::pair<int, int>, std::pair<int, int> >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_heap.h:355:22: required from 'void std::__make_heap(_RandomAccessIterator, _RandomAccessIterator, _Compare&) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1666:23: required from 'void std::__heap_select(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1937:25: required from 'void std::__partial_sort(_RandomAccessIterator, _RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1953:27: required from 'void std::__introsort_loop(_RandomAccessIterator, _RandomAccessIterator, _Size, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Size = long int; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:1974:25: required from 'void std::__sort(_RandomAccessIterator, _RandomAccessIterator, _Compare) [with _RandomAccessIterator = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = __gnu_cxx::__ops::_Iter_comp_iter<bool (*)(int, int)>]'
/usr/include/c++/10/bits/stl_algo.h:4892:18: required from 'void std::sort(_RAIter, _RAIter, _Compare) [with _RAIter = __gnu_cxx::__normal_iterator<std::pair<std::pair<int, int>, std::pair<int, int> >*, std::vector<std::pair<std::pair<int, int>, std::pair<int, int> > > >; _Compare = bool (*)(int, int)]'
sortbooks.cpp:120:37: required from here
/usr/include/c++/10/bits/predefined_ops.h:194:23: error: cannot convert 'std::pair<std::pair<int, int>, std::pair<int, int> >' to 'int' in argument passing
194 | { return bool(_M_comp(*__it, __val)); }
| ~~~~~~~^~~~~~~~~~~~~~