happiness.cpp: In function 'void insert(node*, ll, ll, ll, ll)':
happiness.cpp:45:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
else if(v <= (s + e >> 1)){
~~^~~
happiness.cpp:49:24: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
insert(p -> l, s, (s + e >> 1), v, f);
~~^~~
happiness.cpp:57:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
insert(p -> r, (s + e >> 1) + 1, e, v, f);
~~^~~
happiness.cpp: In function 'void erase(node*, ll, ll, ll)':
happiness.cpp:69:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
else if(v <= (s + e >> 1)){
~~^~~
happiness.cpp:72:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
erase(p -> l, s, (s + e >> 1), v);
~~^~~
happiness.cpp:79:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
erase(p -> r, (s + e >> 1) + 1, e, v);
~~^~~
happiness.cpp: In function 'void add_intv(node*, ll, ll, ll, ll, ll)':
happiness.cpp:96:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
add_intv(p -> l, s, (s + e >> 1), l, r, v);
~~^~~
happiness.cpp:97:22: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
add_intv(p -> r, (s + e >> 1) + 1, e, l, r, v);
~~^~~
happiness.cpp: In function 'll get_val(node*, ll, ll, ll)':
happiness.cpp:105:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
else if(v <= (s + e >> 1)){
~~^~~
happiness.cpp:106:32: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
return get_val(p -> l, s, (s + e >> 1), v);
~~^~~
happiness.cpp:109:29: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
return get_val(p -> r, (s + e >> 1) + 1, e, v);
~~^~~
grader.cpp: In function 'int main()':
grader.cpp:14:9: warning: unused variable 'd' [-Wunused-variable]
int i, d;
^
grader.cpp:15:12: warning: unused variable 'max_code' [-Wunused-variable]
long long max_code;
^~~~~~~~
grader.cpp:17:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%lld", &N, &M);
~~~~~^~~~~~~~~~~~~~~~~~
grader.cpp:19:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &coins[i]);
~~~~~^~~~~~~~~~~~~~~~~~~
grader.cpp:23:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &Q);
~~~~~^~~~~~~~~~
grader.cpp:26:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &ck, &c);
~~~~~^~~~~~~~~~~~~~~~~
grader.cpp:28:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%lld", &A[j]);
~~~~~^~~~~~~~~~~~~~~