sortbooks.cpp: In function 'node merge(node, node)':
sortbooks.cpp:16:63: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
16 | product.answer = max({a.answer , b.answer , a.smaller(1e18) + b.smaller(a.smaller(1e18))});
| ^~~~
sortbooks.cpp:16:91: warning: overflow in conversion from 'double' to 'int' changes value from '1.0e+18' to '2147483647' [-Woverflow]
16 | product.answer = max({a.answer , b.answer , a.smaller(1e18) + b.smaller(a.smaller(1e18))});
| ^~~~
sortbooks.cpp:18:20: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
18 | while(itr1 < a.v.size() or itr2 < b.v.size()){
| ~~~~~^~~~~~~~~~~~
sortbooks.cpp:18:41: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
18 | while(itr1 < a.v.size() or itr2 < b.v.size()){
| ~~~~~^~~~~~~~~~~~
sortbooks.cpp:19:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
19 | if(itr1 == a.v.size()){
| ~~~~~^~~~~~~~~~~~~
sortbooks.cpp:23:26: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
23 | else if(itr2 == b.v.size()){
| ~~~~~^~~~~~~~~~~~~
sortbooks.cpp: In member function 'node SEGMENT_TREE::_query(int, int, int, int, int)':
sortbooks.cpp:51:68: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
51 | return merge(_query(ind*2,l,mid,ql,qr) , _query(ind*2+1,mid+1,r,ql,qr));
| ^
sortbooks.cpp: In member function 'void SEGMENT_TREE::_update(int, int, int, int, int)':
sortbooks.cpp:63:33: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
63 | else _update(ind*2+1,mid+1,r,pos,val);
| ^