0_0_39544919_5786.cpp: In function 'int main()':
0_0_39544919_5786.cpp:68:36: error: 'itn' was not declared in this scope; did you mean 'int'?
68 | std::function<void(itn, int, int, int, int, int)>update = [&](int jl, int jr, int l, int r, int v, int i)
| ^~~
| int
0_0_39544919_5786.cpp:68:64: error: expression list treated as compound expression in functional cast [-fpermissive]
68 | std::function<void(itn, int, int, int, int, int)>update = [&](int jl, int jr, int l, int r, int v, int i)
| ^
0_0_39544919_5786.cpp:68:65: error: template argument 1 is invalid
68 | std::function<void(itn, int, int, int, int, int)>update = [&](int jl, int jr, int l, int r, int v, int i)
| ^
0_0_39544919_5786.cpp: In lambda function:
0_0_39544919_5786.cpp:76:54: error: expression cannot be used as a function
76 | if (jl <= mid) update(jl, jr, l, mid, v, ls);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~
0_0_39544919_5786.cpp:77:53: error: expression cannot be used as a function
77 | if (jr > mid) update(jl, jr, mid + 1, r, v, rs);
| ~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
0_0_39544919_5786.cpp: In function 'int main()':
0_0_39544919_5786.cpp:68:75: error: cannot convert 'main()::<lambda(int, int, int, int, int, int)>' to 'int' in initialization
68 | std::function<void(itn, int, int, int, int, int)>update = [&](int jl, int jr, int l, int r, int v, int i)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| main()::<lambda(int, int, int, int, int, int)>
69 | {
| ~
70 | if (jl <= l && jr >= r)
| ~~~~~~~~~~~~~~~~~~~~~~~
71 | {
| ~
72 | lazy(l, r, v, i);
| ~~~~~~~~~~~~~~~~~
73 | return;
| ~~~~~~~
74 | }
| ~
75 | down(l, r, i);
| ~~~~~~~~~~~~~~
76 | if (jl <= mid) update(jl, jr, l, mid, v, ls);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
77 | if (jr > mid) update(jl, jr, mid + 1, r, v, rs);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
78 | up(i);
| ~~~~~~
79 | };
| ~
0_0_39544919_5786.cpp:94:58: error: expression list treated as compound expression in functional cast [-fpermissive]
94 | std::function<int(itn, int, int, int, int)>query = [&](int jl, int jr, int l, int r, int i)->int
| ^
0_0_39544919_5786.cpp:94:59: error: template argument 1 is invalid
94 | std::function<int(itn, int, int, int, int)>query = [&](int jl, int jr, int l, int r, int i)->int
| ^
0_0_39544919_5786.cpp: In lambda function:
0_0_39544919_5786.cpp:99:60: error: expression cannot be used as a function
99 | if (jl <= mid) ans += query(jl, jr, l, mid, ls);
| ~~~~~^~~~~~~~~~~~~~~~~~~~
0_0_39544919_5786.cpp:100:59: error: expression cannot be used as a function
100 | if (jr > mid) ans += query(jl, jr, mid + 1, r, rs);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
0_0_39544919_5786.cpp: In function 'int main()':
0_0_39544919_5786.cpp:94:68: error: cannot convert 'main()::<lambda(int, int, int, int, int)>' to 'int' in initialization
94 | std::function<int(itn, int, int, int, int)>query = [&](int jl, int jr, int l, int r, int i)->int
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| |
| main()::<lambda(int, int, int, int, int)>
95 | {
| ~
96 | if (jl <= l && jr >= r) return sum[i];
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97 | down(l, r, i);
| ~~~~~~~~~~~~~~
98 | int ans = 0;
| ~~~~~~~~~~~~
99 | if (jl <= mid) ans += query(jl, jr, l, mid, ls);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100 | if (jr > mid) ans += query(jl, jr, mid + 1, r, rs);
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
101 | return ans;
| ~~~~~~~~~~~
102 | };
| ~
0_0_39544919_5786.cpp:117:39: error: 'update' cannot be used as a function
117 | update(l, r, 1, n, x, 1);
| ~~~~~~^~~~~~~~~~~~~~~~~~
0_0_39544919_5786.cpp:122:51: error: 'query' cannot be used as a function
122 | std::cout << query(l, r, 1, n, 1) << '\n';
| ~~~~~^~~~~~~~~~~~~~~
|