0_0_21794189_28297.cpp: In function 'll Query(ll&, int)':
0_0_21794189_28297.cpp:54:21: error: invalid types 'll {aka long long int}[int]' for array subscript
ans += arr[x];
^
0_0_21794189_28297.cpp: In function 'void Update(ll&, int, int)':
0_0_21794189_28297.cpp:66:14: error: invalid types 'll {aka long long int}[int]' for array subscript
arr[x] += val;
^
0_0_21794189_28297.cpp: In function 'void AddNum(int)':
0_0_21794189_28297.cpp:74:34: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
curnum += (Query(cntnum,vsize)-Query(cntnum,inx))*value[inx]+value[inx];
^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
ll Query( ll &arr, int x)
^
0_0_21794189_28297.cpp:74:52: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
curnum += (Query(cntnum,vsize)-Query(cntnum,inx))*value[inx]+value[inx];
^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
ll Query( ll &arr, int x)
^
0_0_21794189_28297.cpp:75:31: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
curnum += Query(cntsum,inx);
^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
ll Query( ll &arr, int x)
^
0_0_21794189_28297.cpp:76:24: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
Update(cntnum,inx,1);
^
0_0_21794189_28297.cpp:60:6: note: in passing argument 1 of 'void Update(ll&, int, int)'
void Update( ll &arr, int x, int val)
^
0_0_21794189_28297.cpp:77:33: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
Update(cntsum,inx,value[inx]);
^
0_0_21794189_28297.cpp:60:6: note: in passing argument 1 of 'void Update(ll&, int, int)'
void Update( ll &arr, int x, int val)
^
0_0_21794189_28297.cpp: In function 'void DelNum(int)':
0_0_21794189_28297.cpp:82:25: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
Update(cntnum,inx,-1);
^
0_0_21794189_28297.cpp:60:6: note: in passing argument 1 of 'void Update(ll&, int, int)'
void Update( ll &arr, int x, int val)
^
0_0_21794189_28297.cpp:83:34: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
Update(cntsum,inx,-value[inx]);
^
0_0_21794189_28297.cpp:60:6: note: in passing argument 1 of 'void Update(ll&, int, int)'
void Update( ll &arr, int x, int val)
^
0_0_21794189_28297.cpp:84:34: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
curnum -= (Query(cntnum,vsize)-Query(cntnum,inx))*value[inx]+value[inx];
^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
ll Query( ll &arr, int x)
^
0_0_21794189_28297.cpp:84:52: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
curnum -= (Query(cntnum,vsize)-Query(cntnum,inx))*value[inx]+value[inx];
^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
ll Query( ll &arr, int x)
^
0_0_21794189_28297.cpp:85:31: error: invalid initialization of non-const reference of type 'll& {aka long long int&}' from an rvalue of type 'll* {aka long long int*}'
curnum -= Query(cntsum,inx);
^
0_0_21794189_28297.cpp:49:4: note: in passing argument 1 of 'll Query(ll&, int)'
ll Query( ll &arr, int x)
^
|