books.cpp: In function 'll minimum_walk(std::vector<int>, int)':
books.cpp:78:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
78 | for(int i = 0; i < p.size(); i++) ans += abs(i-p[i]);
| ~~^~~~~~~~~~
books.cpp:97:19: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
97 | for(int i = 0; i < A.size(); i++) {
| ~~^~~~~~~~~~
books.cpp: In instantiation of 'void Segtree<node_seg, node_query, index_t>::init(size_t, index_t, index_t, const std::vector<_Tp>&) [with node_seg = Node_min; node_query = Node_min; index_t = int; size_t = long unsigned int]':
books.cpp:56:3: required from 'Segtree<node_seg, node_query, index_t>::Segtree(const std::vector<_Tp>&) [with node_seg = Node_min; node_query = Node_min; index_t = int]'
books.cpp:105:37: required from here
books.cpp:28:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
28 | init(i<<1, s, s+e>>1, A);
| ~^~
books.cpp:29:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
29 | init(i<<1|1, s+e>>1, e, A);
| ~^~
books.cpp: In instantiation of 'void Segtree<node_seg, node_query, index_t>::init(size_t, index_t, index_t, const std::vector<_Tp>&) [with node_seg = Node_max; node_query = Node_max; index_t = int; size_t = long unsigned int]':
books.cpp:56:3: required from 'Segtree<node_seg, node_query, index_t>::Segtree(const std::vector<_Tp>&) [with node_seg = Node_max; node_query = Node_max; index_t = int]'
books.cpp:106:37: required from here
books.cpp:28:19: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
28 | init(i<<1, s, s+e>>1, A);
| ~^~
books.cpp:29:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
29 | init(i<<1|1, s+e>>1, e, A);
| ~^~
books.cpp: In instantiation of 'node_seg Segtree<node_seg, node_query, index_t>::query(size_t, index_t, index_t, index_t, index_t) const [with node_seg = Node_min; node_query = Node_min; index_t = int; size_t = long unsigned int]':
books.cpp:59:71: required from 'node_seg Segtree<node_seg, node_query, index_t>::query(index_t, index_t) const [with node_seg = Node_min; node_query = Node_min; index_t = int]'
books.cpp:112:30: required from here
books.cpp:47:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
47 | return query(i<<1, s, s+e>>1, l, r)+query(i<<1|1, s+e>>1, e, l, r);
| ~^~
books.cpp:47:54: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
47 | return query(i<<1, s, s+e>>1, l, r)+query(i<<1|1, s+e>>1, e, l, r);
| ~^~
books.cpp: In instantiation of 'node_seg Segtree<node_seg, node_query, index_t>::query(size_t, index_t, index_t, index_t, index_t) const [with node_seg = Node_max; node_query = Node_max; index_t = int; size_t = long unsigned int]':
books.cpp:59:71: required from 'node_seg Segtree<node_seg, node_query, index_t>::query(index_t, index_t) const [with node_seg = Node_max; node_query = Node_max; index_t = int]'
books.cpp:113:30: required from here
books.cpp:47:26: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
47 | return query(i<<1, s, s+e>>1, l, r)+query(i<<1|1, s+e>>1, e, l, r);
| ~^~
books.cpp:47:54: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
47 | return query(i<<1, s, s+e>>1, l, r)+query(i<<1|1, s+e>>1, e, l, r);
| ~^~