Problem segmenttree2
User user123
Submission Time 2023-08-10 21:55:48
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree2.cpp: In function ‘ll query(int)’:
segmenttree2.cpp:33:22: error: cannot convert ‘std::vector<long long int>’ to ‘ll*’ {aka ‘long long int*’}
33 | return (x+1)*sum(fwtree1, x)-sum(fwtree2, x);
| ^~~~~~~
| |
| std::vector<long long int>
segmenttree2.cpp:21:11: note: initializing argument 1 of ‘ll sum(ll*, int)’
21 | ll sum(ll fwtree[], int x)
| ~~~^~~~~~~~
segmenttree2.cpp:33:38: error: cannot convert ‘std::vector<long long int>’ to ‘ll*’ {aka ‘long long int*’}
33 | return (x+1)*sum(fwtree1, x)-sum(fwtree2, x);
| ^~~~~~~
| |
| std::vector<long long int>
segmenttree2.cpp:21:11: note: initializing argument 1 of ‘ll sum(ll*, int)’
21 | ll sum(ll fwtree[], int x)