Problem segmenttree
User Schoolpurposes
Submission Time 2025-12-03 16:19:31
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree.cpp:2:1: error: ‘init’ does not name a type; did you mean ‘int’?
2 | init[MAX]; // init[i] = initial value of leaf i
| ^~~~
| int
segmenttree.cpp:31:2: error: expected ‘;’ after struct definition
31 | }
| ^
| ;
segmenttree.cpp: In constructor ‘node::node(int, int)’:
segmenttree.cpp:8:19: error: ‘init’ was not declared in this scope; did you mean ‘int’?
8 | val = init[S];
| ^~~~
| int