Problem goombatower
User oolimry
Submission Time 2023-12-11 11:47:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

goombatower.cpp: In function ‘void update(ll&, ll, ll, ll, ll)’:
goombatower.cpp:38:23: error: cannot bind non-const lvalue reference of type ‘ll&’ {aka ‘long long int&’} to an rvalue of type ‘ll’ {aka ‘long long int’}
38 | if(p<=mid)update(lc[c],cl,mid,p,val);
| ~~~~^
goombatower.cpp:31:17: note: initializing argument 1 of ‘void update(ll&, ll, ll, ll, ll)’
31 | void update(ll &c,ll cl,ll cr,ll p,ll val){
| ~~~~^
goombatower.cpp:39:18: error: cannot bind non-const lvalue reference of type ‘ll&’ {aka ‘long long int&’} to an rvalue of type ‘ll’ {aka ‘long long int’}
39 | else update(rc[c],mid+1,cr,p,val);
| ~~~~^
goombatower.cpp:31:17: note: initializing argument 1 of ‘void update(ll&, ll, ll, ll, ll)’
31 | void update(ll &c,ll cl,ll cr,ll p,ll val){
| ~~~~^
goombatower.cpp: In function ‘void build(ll&, ll, ll)’:
goombatower.cpp:62:13: error: cann