happiness.cpp: In function 'void spread(int)':
happiness.cpp:28:15: error: 'struct node' has no member named 'sum'
if(T[T[p].l].sum) T[T[p].l].lz += T[p].lz;
^~~
happiness.cpp:29:15: error: 'struct node' has no member named 'sum'
if(T[T[p].r].sum) T[T[p].r].lz += T[p].lz;
^~~
happiness.cpp: In function 'void insert(int, ll, ll, ll, ll)':
happiness.cpp:41:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
else if(v <= (s + e >> 1)){
~~^~~
happiness.cpp:45:24: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
insert(T[p].l, s, (s + e >> 1), v, f);
~~^~~
happiness.cpp:53:21: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
insert(T[p].r, (s + e >> 1) + 1, e, v, f);
~~^~~
happiness.cpp: In function 'void erase(int, ll, ll, ll)':
happiness.cpp:68:18: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
else if(v <= (s + e >> 1)){
~~^~~
happiness.cpp:71:23: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
erase(T[p].l, s, (s + e >> 1), v);
~~^~~
happiness.cpp:78:20: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
erase(T[p].r, (s + e >> 1) + 1, e, v);
~~^~~
happiness.cpp: In function 'll get_sum(int, ll, ll, ll, ll)':
happiness.cpp:91:33: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
ll ret = get_sum(T[p].l, s, (s + e >> 1), l, r) + get_sum(T[p].r, (s + e >> 1) + 1, e, l, r);
~~^~~
happiness.cpp:91:71: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
ll ret = get_sum(T[p].l, s, (s + e >> 1), l, r) + get_sum(T[p].r, (s + e >> 1) + 1, e, l, r);
~~^~~
happiness.cpp: In function 'void add_intv(int, ll, ll, ll, ll, ll)':
happiness.cpp:108:25: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
add_intv(T[p].l, s, (s + e >> 1), l, r, v);
~~^~~
happiness.cpp:109:22: warning: suggest parentheses around '+' inside '>>' [-Wparentheses]
add_intv(T[p].r, (s + e >> 1) + 1, e, l, r, 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]);
~~~~~^~~~~~~~~~~~~~~