Problem segmenttree
User weccs
Submission Time 2025-09-20 16:31:53
Score 0
Max Time N/A
Max Memory N/A

Compile Error

segmenttree.cpp:8:26: error: return type specification for constructor invalid
8 | void node(int _s, int _e) {
| ^
segmenttree.cpp:32:21: error: ISO C++ forbids declaration of ‘update’ with no type [-fpermissive]
32 | update(int p, int v) {
| ^
segmenttree.cpp:46:2: error: expected ‘;’ after struct definition
46 | }
| ^
| ;
segmenttree.cpp: In member function ‘int node::update(int, int)’:
segmenttree.cpp:35:4: error: return-statement with no value, in function returning ‘int’ [-fpermissive]
35 | return;
| ^~~~~~
segmenttree.cpp: In function ‘int main()’:
segmenttree.cpp:55:3: error: expected ‘}’ before ‘else’
55 | else if (a == 2) {
| ^~~~
segmenttree.cpp:53:15: note: to match this ‘{’
53 | if (a == 1) {
| ^
segmenttree.cpp:58:2: error: expected ‘}’ at end of input
58 | }
|