shoes.cpp:9:60: error: 'n' was not declared in this scope
9 | void upd(int pos, int val, int v = 1, int tl = 1, int tr = n){
| ^
shoes.cpp:19:55: error: 'n' was not declared in this scope
19 | int get(int l, int r, int v = 1, int tl = 1, int tr = n){
| ^
shoes.cpp: In function 'long long int count_swaps(std::vector<int>)':
shoes.cpp:3:12: error: cannot convert 'std::vector<int>::size' from type 'std::vector<int>::size_type (std::vector<int>::)() const noexcept' {aka 'long unsigned int (std::vector<int>::)() const noexcept'} to type 'int'
3 | #define sz size
| ^~~~
shoes.cpp:26:15: note: in expansion of macro 'sz'
26 | int n = v.sz, k;
| ^~
shoes.cpp:32:47: error: 'all' was not declared in this scope
32 | for(int i = 1; i <= 2*n; i ++)reverse(all(g[i]));
| ^~~
shoes.cpp:32:47: note: suggested alternatives:
In file included from /usr/include/c++/13/filesystem:48,
from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:200,
from shoes.cpp:2:
/usr/include/c++/13/bits/fs_fwd.h:154:7: note: 'std::filesystem::perms::all'
154 | all = 0777,
| ^~~
In file included from /usr/include/x86_64-linux-gnu/c++/13/bits/stdc++.h:89:
/usr/include/c++/13/ranges:1308:27: note: 'std::ranges::views::all'
1308 | inline constexpr _All all;
| ^~~
shoes.cpp:3:12: error: invalid use of member function 'constexpr std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
3 | #define sz size
| ^
shoes.cpp:37:39: note: in expansion of macro 'sz'
37 | x = g[x][g[x].sz-1];
| ^~
shoes.cpp:40:28: error: too few arguments to function 'void upd(int, int, int, int, int)'
40 | upd(x);
| ~~~^~~
shoes.cpp:9:6: note: declared here
9 | void upd(int pos, int val, int v = 1, int tl = 1, int tr = n){
| ^~~
shoes.cpp:3:12: error: invalid use of member function 'constexpr std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
3 | #define sz size
| ^
shoes.cpp:45:46: note: in expansion of macro 'sz'
45 | k = get(i, g[x][g[x].sz-1]);
| ^~
shoes.cpp:3:12: error: invalid use of member function 'constexpr std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
3 | #define sz size
| ^
shoes.cpp:46:42: note: in expansion of macro 'sz'
46 | ans += g[x][g[x].sz-1] - i - k;
| ^~
shoes.cpp:3:12: error: invalid use of member function 'constexpr std::vector<_Tp, _Alloc>::size_type std::vector<_Tp, _Alloc>::size() const [with _Tp = int; _Alloc = std::allocator<int>; size_type = long unsigned int]' (did you forget the '()' ?)
3 | #define sz size
| ^
shoes.cpp:47:39: note: in expansion of macro 'sz'
47 | upd(g[x][g[x].sz-1]);
| ^~