happiness.cpp: In function 'bool check()':
happiness.cpp:77:42: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
77 | root->rangeUpdate(mxv+1, pow2-1, -inf);
| ^~~~
happiness.cpp:53:38: note: initializing argument 3 of 'void Node::rangeUpdate(long long int, long long int, long long int&)'
53 | void rangeUpdate(ll l, ll r, ll& v) {
| ^
happiness.cpp:79:42: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
79 | root->rangeUpdate(mxv+1, pow2-1, +inf);
| ^~~~
happiness.cpp:53:38: note: initializing argument 3 of 'void Node::rangeUpdate(long long int, long long int, long long int&)'
53 | void rangeUpdate(ll l, ll r, ll& v) {
| ^
happiness.cpp: In function 'void add(long long int, long long int*)':
happiness.cpp:86:43: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
86 | root->rangeUpdate(b[i]+1, pow2-1, -b[i]);
| ^~~~~
happiness.cpp:53:38: note: initializing argument 3 of 'void Node::rangeUpdate(long long int, long long int, long long int&)'
53 | void rangeUpdate(ll l, ll r, ll& v) {
| ^
happiness.cpp:89:43: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
89 | root->rangeUpdate(b[i], b[i], +inf);
| ^~~~
happiness.cpp:53:38: note: initializing argument 3 of 'void Node::rangeUpdate(long long int, long long int, long long int&)'
53 | void rangeUpdate(ll l, ll r, ll& v) {
| ^
happiness.cpp: In function 'void rem(long long int, long long int*)':
happiness.cpp:97:43: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
97 | root->rangeUpdate(b[i]+1, pow2-1, +b[i]);
| ^~~~~
happiness.cpp:53:38: note: initializing argument 3 of 'void Node::rangeUpdate(long long int, long long int, long long int&)'
53 | void rangeUpdate(ll l, ll r, ll& v) {
| ^
happiness.cpp:101:43: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
101 | root->rangeUpdate(b[i], b[i], -inf);
| ^~~~
happiness.cpp:53:38: note: initializing argument 3 of 'void Node::rangeUpdate(long long int, long long int, long long int&)'
53 | void rangeUpdate(ll l, ll r, ll& v) {
| ^
happiness.cpp: In function 'bool init(int, long long int, long long int*)':
happiness.cpp:108:40: error: cannot bind non-const lvalue reference of type 'long long int&' to an rvalue of type 'long long int'
108 | root->rangeUpdate(0, pow2-1, pow2-1-inf);
| ~~~~~~^~~~
happiness.cpp:53:38: note: initializing argument 3 of 'void Node::rangeUpdate(long long int, long long int, long long int&)'
53 | void rangeUpdate(ll l, ll r, ll& v) {
| ^
grader.cpp: In function 'int main()':
grader.cpp:16:12: warning: unused variable 'max_code' [-Wunused-variable]
16 | long long max_code;
| ^~~~~~~~