happiness.cpp: In function 'void update(int, ll, ll)':
happiness.cpp:16:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
16 | if (tree[x].tl > pos || tree[x].tr < pos) return ; if (tree[x].tl == tree[x].tr) { tree[x].sum = val; return ; }
| ^~
happiness.cpp:16:56: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
16 | if (tree[x].tl > pos || tree[x].tr < pos) return ; if (tree[x].tl == tree[x].tr) { tree[x].sum = val; return ; }
| ^~
happiness.cpp:15:41: warning: unused variable 'mid' [-Wunused-variable]
15 | void update(int x, ll pos, ll val) { ll mid = (tree[x].tl + tree[x].tr) / 2;
| ^~~
happiness.cpp: In function 'll query(int, int, int)':
happiness.cpp:21:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
21 | if (tree[x].tl > r || tree[x].tr < l) return 0; if (l <= tree[x].tl && tree[x].tr <= r) return tree[x].sum;
| ^~
happiness.cpp:21:53: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
21 | if (tree[x].tl > r || tree[x].tr < l) return 0; if (l <= tree[x].tl && tree[x].tr <= r) return tree[x].sum;
| ^~
happiness.cpp:20:36: warning: unused variable 'mid' [-Wunused-variable]
20 | ll query(int x, int l, int r) { ll mid = (tree[x].tl + tree[x].tr) / 2;
| ^~~
happiness.cpp: In function 'bool init(int, ll, ll*)':
happiness.cpp:33:5: warning: this 'for' clause does not guard... [-Wmisleading-indentation]
33 | for (int i = 0; i < countCoins; i++) update(1, coins[i], coins[i]); return valid();
| ^~~
happiness.cpp:33:73: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'for'
33 | for (int i = 0; i < countCoins; i++) update(1, coins[i], coins[i]); return valid();
| ^~~~~~
happiness.cpp: In function 'bool is_happy(int, int, ll*)':
happiness.cpp:38:5: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
38 | if (event == -1) for (int i = 0; i < countCoins; i++) update(1, coins[i], 0); return valid();
| ^~
happiness.cpp:38:83: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
38 | if (event == -1) for (int i = 0; i < countCoins; i++) update(1, coins[i], 0); return valid();
| ^~~~~~
grader.cpp: In function 'int main()':
grader.cpp:16:12: warning: unused variable 'max_code' [-Wunused-variable]
16 | long long max_code;
| ^~~~~~~~