wall.cpp:24:1: error: 'vector' does not name a type
24 | vector <point> t(4 * MAX, {0, 0}), lazy(4 * MAX, {-1, INF});
| ^~~~~~
wall.cpp:24:33: error: expected unqualified-id before ')' token
24 | vector <point> t(4 * MAX, {0, 0}), lazy(4 * MAX, {-1, INF});
| ^
wall.cpp:24:59: error: expected unqualified-id before ')' token
24 | vector <point> t(4 * MAX, {0, 0}), lazy(4 * MAX, {-1, INF});
| ^
wall.cpp:25:1: error: 'vector' does not name a type
25 | vector <int> h;
| ^~~~~~
wall.cpp: In function 'void push(int)':
wall.cpp:28:13: error: 'lazy' was not declared in this scope
28 | if (lazy[v].ma != -1) {
| ^~~~
wall.cpp:29:21: error: 't' was not declared in this scope
29 | if (t[v*2].mi < lazy[v].ma) {
| ^
wall.cpp:31:37: error: 'max' was not declared in this scope; did you mean 'std::max'?
31 | t[v*2].ma = max(t[v*2].ma, t[v*2].mi);
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:34:21: error: 't' was not declared in this scope
34 | if (t[v*2+1].mi < lazy[v].ma) {
| ^
wall.cpp:36:39: error: 'max' was not declared in this scope; did you mean 'std::max'?
36 | t[v*2+1].ma = max(t[v*2+1].ma, t[v*2+1].mi);
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:41:13: error: 'lazy' was not declared in this scope
41 | if (lazy[v].mi != INF) {
| ^~~~
wall.cpp:42:21: error: 't' was not declared in this scope
42 | if (t[v*2].ma > lazy[v].mi) {
| ^
wall.cpp:44:37: error: 'min' was not declared in this scope; did you mean 'std::min'?
44 | t[v*2].mi = min(t[v*2].mi, t[v*2].ma);
| ^~~
| std::min
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: 'std::min' declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:47:21: error: 't' was not declared in this scope
47 | if (t[v*2+1].ma > lazy[v].mi) {
| ^
wall.cpp:49:39: error: 'min' was not declared in this scope; did you mean 'std::min'?
49 | t[v*2+1].mi = min(t[v*2+1].mi, t[v*2+1].ma);
| ^~~
| std::min
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: 'std::min' declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp: In function 'void update1(int, int, int, int, int, int)':
wall.cpp:59:21: error: 't' was not declared in this scope
59 | if (t[v].mi < x) {
| ^
wall.cpp:60:25: error: 'lazy' was not declared in this scope
60 | lazy[v].ma = max(lazy[v].ma, x);
| ^~~~
wall.cpp:60:38: error: 'max' was not declared in this scope; did you mean 'std::max'?
60 | lazy[v].ma = max(lazy[v].ma, x);
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:68:32: error: 'min' was not declared in this scope; did you mean 'std::min'?
68 | update(v*2, tl, tm, l, min(r, tm), x);
| ^~~
| std::min
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: 'std::min' declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:68:9: error: 'update' was not declared in this scope; did you mean 'update1'?
68 | update(v*2, tl, tm, l, min(r, tm), x);
| ^~~~~~
| update1
wall.cpp:69:33: error: 'max' was not declared in this scope; did you mean 'std::max'?
69 | update(v*2+1, tm+1, tr, max(l, tm+1), r, x);
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:70:9: error: 't' was not declared in this scope; did you mean 'tm'?
70 | t[v].ma = max(t[v*2].ma, t[v*2+1].ma);
| ^
| tm
wall.cpp: In function 'void update2(int, int, int, int, int, int)':
wall.cpp:77:21: error: 't' was not declared in this scope
77 | if (t[v].ma > x) {
| ^
wall.cpp:78:25: error: 'lazy' was not declared in this scope
78 | lazy[v].mi = min(lazy[v].mi, x);
| ^~~~
wall.cpp:78:38: error: 'min' was not declared in this scope; did you mean 'std::min'?
78 | lazy[v].mi = min(lazy[v].mi, x);
| ^~~
| std::min
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: 'std::min' declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:80:35: error: 'max' was not declared in this scope; did you mean 'std::max'?
80 | t[v].mi = max(t[v].ma, t[v].mi);
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:86:32: error: 'min' was not declared in this scope; did you mean 'std::min'?
86 | update(v*2, tl, tm, l, min(r, tm), x);
| ^~~
| std::min
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3455:5: note: 'std::min' declared here
3455 | min(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:86:9: error: 'update' was not declared in this scope; did you mean 'update2'?
86 | update(v*2, tl, tm, l, min(r, tm), x);
| ^~~~~~
| update2
wall.cpp:87:33: error: 'max' was not declared in this scope; did you mean 'std::max'?
87 | update(v*2+1, tm+1, tr, max(l, tm+1), r, x);
| ^~~
| std::max
In file included from /usr/include/c++/11/algorithm:62,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from wall.cpp:2:
/usr/include/c++/11/bits/stl_algo.h:3467:5: note: 'std::max' declared here
3467 | max(initializer_list<_Tp> __l, _Compare __comp)
| ^~~
wall.cpp:88:9: error: 't' was not declared in this scope; did you mean 'tm'?
88 | t[v].ma = max(t[v*2].ma, t[v*2+1].ma);
| ^
| tm
wall.cpp: In function 'void build(int, int, int)':
wall.cpp:94:17: error: 'h' was not declared in this scope
94 | h.pb(t[v]);
| ^
wall.cpp:94:22: error: 't' was not declared in this scope
94 | h.pb(t[v]);
| ^
wall.cpp: In function 'void buildWall(int, int, int*, int*, int*, int*, int*)':
wall.cpp:111:15: error: invalid conversion from 'int*' to 'int' [-fpermissive]
111 | build(finalHeight);
| ^~~~~~~~~~~
| |
| int*
wall.cpp:111:14: error: too few arguments to function 'void build(int, int, int)'
111 | build(finalHeight);
| ~~~~~^~~~~~~~~~~~~
wall.cpp:92:6: note: declared here
92 | void build(int v, int tl, int tr) {
| ^~~~~