wall.cpp:8:24: error: invalid declarator before 'lazy'
8 | vector<pair<int, int>> lazy(4 * N);
| ^~~~
wall.cpp: In function 'void push(long long int, long long int, long long int)':
wall.cpp:11:9: error: 'lazy' was not declared in this scope
11 | if (lazy[v].second == 1){
| ^~~~
wall.cpp:13:73: error: expected ';' before 't'
13 | t[v * 2] = {min(t[v * 2].first, x), min(t[v * 2].second, x)}
| ^
| ;
14 | t[v * 2 + 1] = {min(t[v * 2 + 1].first, x), min(t[v * 2 + 1].second, x)}
| ~
wall.cpp:28:73: error: expected ';' before 't'
28 | t[v * 2] = {max(t[v * 2].first, x), max(t[v * 2].second, x)}
| ^
| ;
29 | t[v * 2 + 1] = {max(t[v * 2 + 1].first, x), max(t[v * 2 + 1].second, x)}
| ~
wall.cpp: In function 'void build(long long int, long long int, long long int)':
wall.cpp:54:69: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::pair<long long int, long long int> >, std::pair<long long int, long long int> >::value_type' {aka 'std::pair<long long int, long long int>'} and '<brace-enclosed initializer list>')
54 | t[v] = {max(t[2 * v], t[2 * v + 1]), min(t[2 * v], t[2 * v + 1])};
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from wall.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:390:7: note: candidate: 'std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch&>::type) [with _T1 = long long int; _T2 = long long int; typename std::conditional<std::__and_<std::is_copy_assignable<_T1>, std::is_copy_assignable<_T2> >::value, const std::pair<_T1, _T2>&, const std::__nonesuch&>::type = const std::pair<long long int, long long int>&]'
390 | operator=(typename conditional<
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:393:41: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::conditional<true, const std::pair<long long int, long long int>&, const std::__nonesuch&>::type' {aka 'const std::pair<long long int, long long int>&'}
390 | operator=(typename conditional<
| ~~~~~~~~~~~~~~~~~~~~~
391 | __and_<is_copy_assignable<_T1>,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
392 | is_copy_assignable<_T2>>::value,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
393 | const pair&, const __nonesuch&>::type __p)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_pair.h:401:7: note: candidate: 'std::pair<_T1, _T2>& std::pair<_T1, _T2>::operator=(typename std::conditional<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch&&>::type) [with _T1 = long long int; _T2 = long long int; typename std::conditional<std::__and_<std::is_move_assignable<_Tp>, std::is_move_assignable<_T2> >::value, std::pair<_T1, _T2>&&, std::__nonesuch&&>::type = std::pair<long long int, long long int>&&]'
401 | operator=(typename conditional<
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:404:31: note: no known conversion for argument 1 from '<brace-enclosed initializer list>' to 'std::conditional<true, std::pair<long long int, long long int>&&, std::__nonesuch&&>::type' {aka 'std::pair<long long int, long long int>&&'}
401 | operator=(typename conditional<
| ~~~~~~~~~~~~~~~~~~~~~
402 | __and_<is_move_assignable<_T1>,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
403 | is_move_assignable<_T2>>::value,
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
404 | pair&&, __nonesuch&&>::type __p)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_pair.h:418:2: note: candidate: 'template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, const _U1&>, std::is_assignable<_T2&, const _U2&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(const std::pair<_U1, _U2>&) [with _U1 = _U1; _U2 = _U2; _T1 = long long int; _T2 = long long int]'
418 | operator=(const pair<_U1, _U2>& __p)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:418:2: note: template argument deduction/substitution failed:
wall.cpp:54:69: note: couldn't deduce template parameter '_U1'
54 | t[v] = {max(t[2 * v], t[2 * v + 1]), min(t[2 * v], t[2 * v + 1])};
| ^
In file included from /usr/include/c++/10/bits/stl_algobase.h:64,
from /usr/include/c++/10/bits/specfun.h:45,
from /usr/include/c++/10/cmath:1927,
from /usr/include/x86_64-linux-gnu/c++/10/bits/stdc++.h:41,
from wall.cpp:1:
/usr/include/c++/10/bits/stl_pair.h:430:2: note: candidate: 'template<class _U1, class _U2> typename std::enable_if<std::__and_<std::is_assignable<_T1&, _U1&&>, std::is_assignable<_T2&, _U2&&> >::value, std::pair<_T1, _T2>&>::type std::pair<_T1, _T2>::operator=(std::pair<_U1, _U2>&&) [with _U1 = _U1; _U2 = _U2; _T1 = long long int; _T2 = long long int]'
430 | operator=(pair<_U1, _U2>&& __p)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_pair.h:430:2: note: template argument deduction/substitution failed:
wall.cpp:54:69: note: couldn't deduce template parameter '_U1'
54 | t[v] = {max(t[2 * v], t[2 * v + 1]), min(t[2 * v], t[2 * v + 1])};
| ^
wall.cpp: In function 'void update(long long int, long long int, long long int, long long int, long long int, long long int)':
wall.cpp:60:57: error: expected ';' before 'if'
60 | t[v] = {max(t[v].first, x), max(t[v].second, x)}
| ^
| ;
61 |
62 | if (lazy[v].second == 1) lazy[v] = {x, 0};
| ~~
wall.cpp:63:9: error: expected '}' before 'else'
63 | else lazy[v] = {max(lazy[v].first, x), 0};
| ^~~~
wall.cpp:59:28: note: to match this '{'
59 | if (vl >= l && vr <= r){
| ^
wall.cpp:63:14: error: 'lazy' was not declared in this scope
63 | else lazy[v] = {max(lazy[v].first, x), 0};
| ^~~~
wall.cpp: At global scope:
wall.cpp:67:9: error: expected constructor, destructor, or type conversion before '(' token
67 | push(v, vl ,vr);
| ^
wall.cpp:68:15: error: 'vl' was not declared in this scope; did you mean 'vm'?
68 | int vm = (vl + vr) / 2;
| ^~
| vm
wall.cpp:68:20: error: 'vr' was not declared in this scope; did you mean 'vm'?
68 | int vm = (vl + vr) / 2;
| ^~
| vm
wall.cpp:70:11: error: expected constructor, destructor, or type conversion before '(' token
70 | update(2 * v, vl, vm, l, r, x);
| ^
wall.cpp:71:11: error: expected constructor, destructor, or type conversion before '(' token
71 | update(2 * v + 1, vm + 1, vr, l, r, x);
| ^
wall.cpp:73:5: error: 't' does not name a type
73 | t[v] = {max(t[2 * v], t[2 * v + 1]), min(t[2 * v], t[2 * v + 1])};
| ^
wall.cpp:74:1: error: expected declaration before '}' token
74 | }
| ^
wall.cpp: In function 'void update2(long long int, long long int, long long int, long long int, long long int, long long int)':
wall.cpp:79:57: error: expected ';' before 'if'
79 | t[v] = {min(t[v].first, x), min(t[v].second, x)}
| ^
| ;
80 |
81 | if (lazy[v].second == 0) lazy[v] = {x, 1};
| ~~
wall.cpp:82:9: error: expected '}' before 'else'
82 | else lazy[v] = {min(lazy[v].first, x), 0};
| ^~~~
wall.cpp:78:28: note: to match this '{'
78 | if (vl >= l && vr <= r){
| ^
wall.cpp:82:14: error: 'lazy' was not declared in this scope
82 | else lazy[v] = {min(lazy[v].first, x), 0};
| ^~~~
wall.cpp: At global scope:
wall.cpp:86:9: error: expected constructor, destructor, or type conversion before '(' token
86 | push(v, vl ,vr);
| ^
wall.cpp:87:9: error: redefinition of 'long long int vm'
87 | int vm = (vl + vr) / 2;
| ^~
wall.cpp:68:9: note: 'long long int vm' previously defined here
68 | int vm = (vl + vr) / 2;
| ^~
wall.cpp:87:15: error: 'vl' was not declared in this scope; did you mean 'vm'?
87 | int vm = (vl + vr) / 2;
| ^~
| vm
wall.cpp:87:20: error: 'vr' was not declared in this scope; did you mean 'vm'?
87 | int vm = (vl + vr) / 2;
| ^~
| vm
wall.cpp:89:12: error: expected constructor, destructor, or type conversion before '(' token
89 | update2(2 * v, vl, vm, l, r, x);
| ^
wall.cpp:90:12: error: expected constructor, destructor, or type conversion before '(' token
90 | update2(2 * v + 1, vm + 1, vr, l, r, x);
| ^
wall.cpp:92:5: error: 't' does not name a type
92 | t[v] = {max(t[2 * v], t[2 * v + 1]), min(t[2 * v], t[2 * v + 1])};
| ^
wall.cpp:93:1: error: expected declaration before '}' token
93 | }
| ^
wall.cpp: In function 'long long int get(long long int, long long int, long long int, long long int)':
wall.cpp:97:15: error: 'r' was not declared in this scope
97 | if (vr <= r && l <= vl){
| ^
wall.cpp:97:20: error: 'l' was not declared in this scope
97 | if (vr <= r && l <= vl){
| ^
wall.cpp:104:35: error: 'l' was not declared in this scope
104 | return max(get(2 * v, vl, vm, l, r), get(2 * v + 1, vm + 1, vr, l, r));
| ^
wall.cpp:104:38: error: 'r' was not declared in this scope
104 | return max(get(2 * v, vl, vm, l, r), get(2 * v + 1, vm + 1, vr, l, r));
| ^