0_0_39612590_4027.cpp:17:5: error: expected initializer before 'int'
17 | int sum=0;
| ^~~
0_0_39612590_4027.cpp:18:5: error: expected unqualified-id before 'while'
18 | while(pos<=n)
| ^~~~~
0_0_39612590_4027.cpp:23:5: error: expected unqualified-id before 'return'
23 | return sum;
| ^~~~~~
0_0_39612590_4027.cpp:24:1: error: expected declaration before '}' token
24 | }
| ^
0_0_39612590_4027.cpp:26:5: error: expected initializer before 'while'
26 | while(pos)
| ^~~~~
0_0_39612590_4027.cpp:31:1: error: expected declaration before '}' token
31 | }
| ^
0_0_39612590_4027.cpp: In function 'int main()':
0_0_39612590_4027.cpp:57:28: error: 'update' was not declared in this scope
57 | if(pre[j]) update(pre[j],j);
| ^~~~~~
0_0_39612590_4027.cpp:61:28: error: 'update' was not declared in this scope
61 | if(pre[k]) update(pre[k],k);
| ^~~~~~
0_0_39612590_4027.cpp:66:30: error: 'Sum' was not declared in this scope; did you mean 'num'?
66 | ans[qt[r].i]=Sum(qt[r].l);
| ^~~
| num
|