xorsum.cpp: In function 'int main()':
xorsum.cpp:26:43: warning: suggest parentheses around '-' inside '>>' [-Wparentheses]
26 | for (int j = 0; j < n; j++) v[(a[j] >> i-1) & 1].pb(a[j]);
| ~^~
xorsum.cpp:28:15: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
28 | int o = (k&4==1||k&4==2); k--;
| ~^~~
xorsum.cpp:28:23: warning: suggest parentheses around comparison in operand of '&' [-Wparentheses]
28 | int o = (k&4==1||k&4==2); k--;
| ~^~~
xorsum.cpp:29:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
29 | for (int j = 0; j < v[0].size(); j++) {
| ~~^~~~~~~~~~~~~
xorsum.cpp:30:40: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
30 | while (k >= 0 && (v[0][j] & (1 << i)-1) + (v[1][k] & (1 << i)-1) >= (1 << i)) k--;
| ~~~~~~~~^~
xorsum.cpp:30:65: warning: suggest parentheses around '-' in operand of '&' [-Wparentheses]
30 | while (k >= 0 && (v[0][j] & (1 << i)-1) + (v[1][k] & (1 << i)-1) >= (1 << i)) k--;
| ~~~~~~~~^~
xorsum.cpp:34:21: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
34 | for (int j = 0; j < v[1].size(); j++) a[v[0].size()+j] = v[1][j];
| ~~^~~~~~~~~~~~~