Problem fenwicktree
User bribritt
Submission Time 2023-02-14 18:35:56
Score 0
Max Time N/A
Max Memory N/A

Compile Error

fenwicktree.cpp: In function ‘ll query(std::vector<long long int>&, ll, ll)’:
fenwicktree.cpp:12:22: error: invalid initialization of non-const reference of type ‘std::vector<long long int>&’ from an rvalue of type ‘int’
12 | return query(0,y)-query(0,x-1);
| ^
fenwicktree.cpp:6:22: note: in passing argument 1 of ‘ll query(std::vector<long long int>&, ll, ll)’
6 | ll query(vector<ll> &ft, ll x, ll y) {
| ~~~~~~~~~~~~^~
fenwicktree.cpp:12:33: error: invalid initialization of non-const reference of type ‘std::vector<long long int>&’ from an rvalue of type ‘int’
12 | return query(0,y)-query(0,x-1);
| ^
fenwicktree.cpp:6:22: note: in passing argument 1 of ‘ll query(std::vector<long long int>&, ll, ll)’
6 | ll query(vector<ll> &ft, ll x, ll y) {
| ~~~~~~~~~~~~^~
fenwicktree.cpp: In functi