bubblesort2.cpp: In function 'void Add(int, int, int, int, int, int)':
bubblesort2.cpp:18:22: error: 'lc' was not declared in this scope
Add(le, ri, val, lc, l, md);
^~
bubblesort2.cpp:18:22: note: suggested alternative: 'le'
Add(le, ri, val, lc, l, md);
^~
le
bubblesort2.cpp:18:29: error: 'md' was not declared in this scope
Add(le, ri, val, lc, l, md);
^~
bubblesort2.cpp:18:29: note: suggested alternative: 'id'
Add(le, ri, val, lc, l, md);
^~
id
bubblesort2.cpp:19:22: error: 'rc' was not declared in this scope
Add(le, ri, val, rc, md, r);
^~
bubblesort2.cpp:19:22: note: suggested alternative: 'ri'
Add(le, ri, val, rc, md, r);
^~
ri
bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:31:40: error: no matching function for call to 'std::vector<std::pair<int, int> >::resize(__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >)'
U.resize(unique(U.begin(), U.end()));
^
In file included from /usr/include/c++/7/vector:64:0,
from /usr/include/c++/7/queue:61,
from /usr/include/x86_64-linux-gnu/c++/7/bits/stdc++.h:86,
from bubblesort2.cpp:2:
/usr/include/c++/7/bits/stl_vector.h:689:7: note: candidate: void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int]
resize(size_type __new_size)
^~~~~~
/usr/include/c++/7/bits/stl_vector.h:689:7: note: no known conversion for argument 1 from '__gnu_cxx::__normal_iterator<std::pair<int, int>*, std::vector<std::pair<int, int> > >' to 'std::vector<std::pair<int, int> >::size_type {aka long unsigned int}'
/usr/include/c++/7/bits/stl_vector.h:709:7: note: candidate: void std::vector<_Tp, _Alloc>::resize(std::vector<_Tp, _Alloc>::size_type, const value_type&) [with _Tp = std::pair<int, int>; _Alloc = std::allocator<std::pair<int, int> >; std::vector<_Tp, _Alloc>::size_type = long unsigned int; std::vector<_Tp, _Alloc>::value_type = std::pair<int, int>]
resize(size_type __new_size, const value_type& __x)
^~~~~~
/usr/include/c++/7/bits/stl_vector.h:709:7: note: candidate expects 2 arguments, 1 provided
bubblesort2.cpp:44:5: error: expected ',' or ';' before 'for'
for (int i = 0; i < n; i ++)
^~~
bubblesort2.cpp:44:21: error: 'i' was not declared in this scope
for (int i = 0; i < n; i ++)
^