wall.cpp: In function 'void update(int, int, int, int, int, int, bool)':
wall.cpp:18:22: error: 'i' was not declared in this scope; did you mean 'id'?
18 | cur = max(cur, seg[i].F); cur = min(cur, seg[i].S);
| ^
| id
wall.cpp: In function 'void make(int, int, int, int, int*)':
wall.cpp:27:22: error: 'i' was not declared in this scope; did you mean 'id'?
27 | cur = max(cur, seg[i].F); cur = min(cur, seg[i].S);
| ^
| id
wall.cpp:28:7: error: 'l' was not declared in this scope
28 | if (l == r) {ans[l] = cur; return ;}
| ^
wall.cpp:28:12: error: 'r' was not declared in this scope
28 | if (l == r) {ans[l] = cur; return ;}
| ^
wall.cpp:31:19: error: expected ')' before 'cur'
31 | make(y, M + 1, R cur, ans);
| ~ ^~~~
| )
wall.cpp:31:25: error: invalid conversion from 'int*' to 'int' [-fpermissive]
31 | make(y, M + 1, R cur, ans);
| ^~~
| |
| int*
wall.cpp:31:7: error: too few arguments to function 'void make(int, int, int, int, int*)'
31 | make(y, M + 1, R cur, ans);
| ~~~~^~~~~~~~~~~~~~~~~~~~~~
wall.cpp:26:6: note: declared here
26 | void make(int id, int L, int R, int cur, int *ans){
| ^~~~