rect.cpp: In function 'll count_rectangles(std::vector<std::vector<int> >)':
rect.cpp:84:53: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
84 | int b1=lower_bound(H.begin(), H.end(), tie(L, R, U+1))-H.begin();
| ~^~
In file included from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rect.cpp:1:
/usr/include/c++/9/tuple:1611:19: note: initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {int, int, int}]'
1611 | tie(_Elements&... __args) noexcept
| ~~~~~~~~~~^~~~~~~~~~
rect.cpp:85:53: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
85 | int b2=lower_bound(H.begin(), H.end(), tie(L, R, D-1))-H.begin();
| ~^~
In file included from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rect.cpp:1:
/usr/include/c++/9/tuple:1611:19: note: initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {int, int, int}]'
1611 | tie(_Elements&... __args) noexcept
| ~~~~~~~~~~^~~~~~~~~~
rect.cpp:86:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::tuple<int, int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
86 | if (b1>=H.size()||tie(L, R, U+1)<H[b1]) continue;
| ~~^~~~~~~~~~
rect.cpp:86:32: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
86 | if (b1>=H.size()||tie(L, R, U+1)<H[b1]) continue;
| ~^~
In file included from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rect.cpp:1:
/usr/include/c++/9/tuple:1611:19: note: initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {int, int, int}]'
1611 | tie(_Elements&... __args) noexcept
| ~~~~~~~~~~^~~~~~~~~~
rect.cpp:87:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::tuple<int, int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
87 | if (b2>=H.size()||tie(L, R, D-1)<H[b2]) continue;
| ~~^~~~~~~~~~
rect.cpp:87:32: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
87 | if (b2>=H.size()||tie(L, R, D-1)<H[b2]) continue;
| ~^~
In file included from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rect.cpp:1:
/usr/include/c++/9/tuple:1611:19: note: initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {int, int, int}]'
1611 | tie(_Elements&... __args) noexcept
| ~~~~~~~~~~^~~~~~~~~~
rect.cpp:90:49: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
90 | b1=lower_bound(V.begin(), V.end(), tie(U, D, L+1))-V.begin();
| ~^~
In file included from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rect.cpp:1:
/usr/include/c++/9/tuple:1611:19: note: initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {int, int, int}]'
1611 | tie(_Elements&... __args) noexcept
| ~~~~~~~~~~^~~~~~~~~~
rect.cpp:91:49: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
91 | b2=lower_bound(V.begin(), V.end(), tie(U, D, R-1))-V.begin();
| ~^~
In file included from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rect.cpp:1:
/usr/include/c++/9/tuple:1611:19: note: initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {int, int, int}]'
1611 | tie(_Elements&... __args) noexcept
| ~~~~~~~~~~^~~~~~~~~~
rect.cpp:92:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::tuple<int, int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
92 | if (b1>=V.size()||tie(U, D, L+1)<V[b1]) continue;
| ~~^~~~~~~~~~
rect.cpp:92:32: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
92 | if (b1>=V.size()||tie(U, D, L+1)<V[b1]) continue;
| ~^~
In file included from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rect.cpp:1:
/usr/include/c++/9/tuple:1611:19: note: initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {int, int, int}]'
1611 | tie(_Elements&... __args) noexcept
| ~~~~~~~~~~^~~~~~~~~~
rect.cpp:93:9: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::tuple<int, int, int> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
93 | if (b2>=V.size()||tie(U, D, R-1)<V[b2]) continue;
| ~~^~~~~~~~~~
rect.cpp:93:32: error: cannot bind non-const lvalue reference of type 'int&' to an rvalue of type 'int'
93 | if (b2>=V.size()||tie(U, D, R-1)<V[b2]) continue;
| ~^~
In file included from /usr/include/c++/9/functional:54,
from /usr/include/c++/9/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/9/algorithm:71,
from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:65,
from rect.cpp:1:
/usr/include/c++/9/tuple:1611:19: note: initializing argument 3 of 'constexpr std::tuple<_Elements& ...> std::tie(_Elements& ...) [with _Elements = {int, int, int}]'
1611 | tie(_Elements&... __args) noexcept
| ~~~~~~~~~~^~~~~~~~~~