bubblesort2.cpp: In function 'std::pair<int, int> split(int, std::pair<int, int>)':
bubblesort2.cpp:31:14: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
31 | auto [a, b] = split(t[v].R, x);
| ^
bubblesort2.cpp:32:46: error: missing template arguments before '{' token
32 | return t[v].R = a, pull(v), std::pair{v, b};
| ^
bubblesort2.cpp:32:46: error: expected ';' before '{' token
32 | return t[v].R = a, pull(v), std::pair{v, b};
| ^
| ;
bubblesort2.cpp:32:47: warning: left operand of comma operator has no effect [-Wunused-value]
32 | return t[v].R = a, pull(v), std::pair{v, b};
| ^
bubblesort2.cpp:32:51: error: expected ';' before '}' token
32 | return t[v].R = a, pull(v), std::pair{v, b};
| ^
| ;
bubblesort2.cpp:32:50: warning: right operand of comma operator has no effect [-Wunused-value]
32 | return t[v].R = a, pull(v), std::pair{v, b};
| ^
bubblesort2.cpp:34:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
34 | auto [a, b] = split(t[v].L, x);
| ^
bubblesort2.cpp:35:42: error: missing template arguments before '{' token
35 | return t[v].L = b, pull(v), std::pair{a, v};
| ^
bubblesort2.cpp:35:42: error: expected ';' before '{' token
35 | return t[v].L = b, pull(v), std::pair{a, v};
| ^
| ;
bubblesort2.cpp:35:43: warning: left operand of comma operator has no effect [-Wunused-value]
35 | return t[v].L = b, pull(v), std::pair{a, v};
| ^
bubblesort2.cpp:35:47: error: expected ';' before '}' token
35 | return t[v].L = b, pull(v), std::pair{a, v};
| ^
| ;
bubblesort2.cpp:35:47: warning: right operand of comma operator has no effect [-Wunused-value]
bubblesort2.cpp: In function 'void add(int&, std::pair<int, int>)':
bubblesort2.cpp:39:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
39 | auto [a, b] = split(v, x);
| ^
bubblesort2.cpp: In function 'void del(int&, std::pair<int, int>)':
bubblesort2.cpp:46:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
46 | auto [a, b] = split(v, x);
| ^
bubblesort2.cpp:47:10: warning: structured bindings only available with '-std=c++17' or '-std=gnu++17'
47 | auto [y, z] = split(a, {x.first, x.second - 1});
| ^
bubblesort2.cpp: In function 'std::vector<int> countScans(std::vector<int>, std::vector<int>, std::vector<int>)':
bubblesort2.cpp:55:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | for (int i = 0; i < A.size(); ++i) add(v, {A[i], i});
| ~~^~~~~~~~~~
bubblesort2.cpp:56:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
56 | for (int i = 0; i < X.size(); ++i) del(v, {A[X[i]], X[i]}), A[X[i]] = V[i], add(v, {A[X[i]], X[i]}), ans[i] = t[v].cost;
| ~~^~~~~~~~~~