cheerleaders.cpp: In function 'void pr(std::vector<long long int>)':
cheerleaders.cpp:30:2: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
30 | for(auto i : v) cout << i << ' '; cout << endl;
| ^~~
cheerleaders.cpp:30:36: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
30 | for(auto i : v) cout << i << ' '; cout << endl;
| ^~~~
cheerleaders.cpp: In function 'long long int inv(std::vector<long long int>&, long long int, long long int, long long int)':
cheerleaders.cpp:53:23: warning: suggest parentheses around '&&' within '||' [-Wparentheses]
53 | if(y == r || x != m && a[x] < a[y]) b[id++] = a[x++], cnt += y - m;
cheerleaders.cpp: In function 'long long int test(long long int, std::vector<long long int>, std::vector<long long int>&)':
cheerleaders.cpp:64:45: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
64 | for(int l = 0; l < (1 << n); l += (1 << j + 1)){
| ~~^~~
cheerleaders.cpp:65:45: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
65 | c += inv(a, l, l + (1 << j), l + (1 << j + 1));
| ~~^~~
cheerleaders.cpp:67:25: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
67 | if(c <= (1LL << n + j - 1) - c) data.push_back(0); else data.push_back(1);
| ~~~~~~^~~
cheerleaders.cpp:68:31: warning: suggest parentheses around '-' inside '<<' [-Wparentheses]
68 | ans += min(c, (1LL << n + j - 1) - c);
| ~~~~~~^~~