Problem candies
User hackerman123
Submission Time 2023-03-16 23:09:38
Score 0
Max Time N/A
Max Memory N/A

Compile Error

candies.cpp: In function ‘int query(int)’:
candies.cpp:10:10: error: ‘fenwickTree’ was not declared in this scope; did you mean ‘fenwicktree’?
10 | res += fenwickTree[where];
| ^~~~~~~~~~~
| fenwicktree
candies.cpp:11:28: error: expected ‘;’ before ‘}’ token
11 | where -= (where & -where)
| ^
| ;
12 | }
| ~
candies.cpp: In function ‘void update(int, int, int)’:
candies.cpp:17:3: error: ‘fenwick’ was not declared in this scope; did you mean ‘fenwicktree’?
17 | fenwick[where] += value;
| ^~~~~~~
| fenwicktree
candies.cpp:18:28: error: expected ‘;’ before ‘}’ token
18 | where += (where & -where)
| ^
| ;
19 | }
| ~
candies.cpp: In function ‘bool check(int)’: