bubblesort2.cpp: In function 'void update(int, int, int, int, int, int)':
bubblesort2.cpp:11:8: error: 'y' was not declared in this scope
11 | if(y < u || r < u || v < l) return;
| ^
bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:33:27: error: no matching function for call to 'lower_bound(std::vector<std::pair<int, int> >::iterator, std::vector<std::pair<int, int> >::iterator, <brace-enclosed initializer list>)'
33 | a[i] = lower_bound(cmp.begin(), cmp.end(), {a[i], i}) - cmp.begin() + 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/vector:62,
from bubblesort2.h:1,
from bubblesort2.cpp:1:
/usr/include/c++/13/bits/stl_algobase.h:1498:5: note: candidate: 'template<class _ForwardIterator, class _Tp> constexpr _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)'
1498 | lower_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:1498:5: note: template argument deduction/substitution failed:
bubblesort2.cpp:33:27: note: couldn't deduce template parameter '_Tp'
33 | a[i] = lower_bound(cmp.begin(), cmp.end(), {a[i], i}) - cmp.begin() + 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/13/algorithm:61,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:51,
from bubblesort2.cpp:2:
/usr/include/c++/13/bits/stl_algo.h:2005:5: note: candidate: 'template<class _FIter, class _Tp, class _Compare> constexpr _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare)'
2005 | lower_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:2005:5: note: template argument deduction/substitution failed:
bubblesort2.cpp:33:27: note: candidate expects 4 arguments, 3 provided
33 | a[i] = lower_bound(cmp.begin(), cmp.end(), {a[i], i}) - cmp.begin() + 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
bubblesort2.cpp:40:27: error: no matching function for call to 'lower_bound(std::vector<std::pair<int, int> >::iterator, std::vector<std::pair<int, int> >::iterator, <brace-enclosed initializer list>)'
40 | v[i] = lower_bound(cmp.begin(), cmp.end(), {v[i], x[i]}) - cmp.begin() + 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:1498:5: note: candidate: 'template<class _ForwardIterator, class _Tp> constexpr _ForwardIterator std::lower_bound(_ForwardIterator, _ForwardIterator, const _Tp&)'
1498 | lower_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/13/bits/stl_algobase.h:1498:5: note: template argument deduction/substitution failed:
bubblesort2.cpp:40:27: note: couldn't deduce template parameter '_Tp'
40 | v[i] = lower_bound(cmp.begin(), cmp.end(), {v[i], x[i]}) - cmp.begin() + 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:2005:5: note: candidate: 'template<class _FIter, class _Tp, class _Compare> constexpr _FIter std::lower_bound(_FIter, _FIter, const _Tp&, _Compare)'
2005 | lower_bound(_ForwardIterator __first, _ForwardIterator __last,
| ^~~~~~~~~~~
/usr/include/c++/13/bits/stl_algo.h:2005:5: note: template argument deduction/substitution failed:
bubblesort2.cpp:40:27: note: candidate expects 4 arguments, 3 provided
40 | v[i] = lower_bound(cmp.begin(), cmp.end(), {v[i], x[i]}) - cmp.begin() + 1;
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~