Problem chickensoup
User asbx
Submission Time 2023-12-06 11:54:19
Score 0
Max Time N/A
Max Memory N/A

Compile Error

chickensoup.cpp: In function ‘int main()’:
chickensoup.cpp:46:21: error: conflicting declaration ‘int d [n]’
46 | int a[n],b[n],c[n],d[n];
| ^
chickensoup.cpp:44:10: note: previous declaration as ‘int d’
44 | int n,q,d,e,f;
| ^
chickensoup.cpp:51:4: error: ‘i’ was not declared in this scope
51 | b[i]=c[i]=d[i]=a[i];
| ^
chickensoup.cpp:59:6: error: invalid types ‘int[int]’ for array subscript
59 | d[i]=d[i-1]+c[i];
| ^
chickensoup.cpp:59:13: error: invalid types ‘int[int]’ for array subscript
59 | d[i]=d[i-1]+c[i];
| ^
chickensoup.cpp:69:24: error: no matching function for call to ‘node::query(int&)’
69 | cout<<(root->query(e))<<endl;
| ^
chickensoup.cpp:17:6: note: candidate: ‘int node::query(int, int)’
17 | int query(int l, int r) {
| ^~~~~
chickensoup.cpp