ltrominoes.cpp: In function 'std::vector<std::vector<bool> > matmul(std::vector<std::vector<bool> >, std::vector<std::vector<bool> >)':
ltrominoes.cpp:53:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
53 | for (int i = 0; i < a.size(); i++) result[i].resize(b.size());
| ~~^~~~~~~~~~
ltrominoes.cpp:54:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < b.size(); j++) result[j] = 0;
| ~~^~~~~~~~~~
ltrominoes.cpp:54:58: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
54 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < b.size(); j++) result[j] = 0;
| ~~^~~~~~~~~~
ltrominoes.cpp:54:87: error: no match for 'operator=' (operand types are '__gnu_cxx::__alloc_traits<std::allocator<std::vector<bool> >, std::vector<bool> >::value_type' {aka 'std::vector<bool>'} and 'int')
54 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < b.size(); j++) result[j] = 0;
| ^
In file included from /usr/include/c++/10/vector:68,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from ltrominoes.cpp:15:
/usr/include/c++/10/bits/stl_bvector.h:740:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(const std::vector<bool, _Alloc>&) [with _Alloc = std::allocator<bool>]'
740 | operator=(const vector& __x)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_bvector.h:740:31: note: no known conversion for argument 1 from 'int' to 'const std::vector<bool>&'
740 | operator=(const vector& __x)
| ~~~~~~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_bvector.h:771:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::vector<bool, _Alloc>&&) [with _Alloc = std::allocator<bool>]'
771 | operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/10/bits/stl_bvector.h:771:26: note: no known conversion for argument 1 from 'int' to 'std::vector<bool>&&'
771 | operator=(vector&& __x) noexcept(_Bit_alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_bvector.h:796:7: note: candidate: 'std::vector<bool, _Alloc>& std::vector<bool, _Alloc>::operator=(std::initializer_list<bool>) [with _Alloc = std::allocator<bool>]'
796 | operator=(initializer_list<bool> __l)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_bvector.h:796:40: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<bool>'
796 | operator=(initializer_list<bool> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~^~~
ltrominoes.cpp:55:23: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < b.size(); j++) for (int k = 0; k < b[0].size(); k++) result[i][k] = result[i][k] || (result[i][j] && result[j][k]);
| ~~^~~~~~~~~~
ltrominoes.cpp:55:58: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < b.size(); j++) for (int k = 0; k < b[0].size(); k++) result[i][k] = result[i][k] || (result[i][j] && result[j][k]);
| ~~^~~~~~~~~~
ltrominoes.cpp:55:93: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<bool>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
55 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < b.size(); j++) for (int k = 0; k < b[0].size(); k++) result[i][k] = result[i][k] || (result[i][j] && result[j][k]);
| ~~^~~~~~~~~~~~~
ltrominoes.cpp: In function 'std::vector<std::vector<bool> > matexp(std::vector<std::vector<bool> >, int64_t)':
ltrominoes.cpp:63:27: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
63 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < a.size(); j++) result[i][j] = i == j;
| ~~^~~~~~~~~~
ltrominoes.cpp:63:62: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<std::vector<bool> >::size_type' {aka 'long unsigned int'} [-Wsign-compare]
63 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < a.size(); j++) result[i][j] = i == j;
| ~~^~~~~~~~~~
ltrominoes.cpp:63:99: error: no match for 'operator=' (operand types are 'std::vector<std::vector<bool> >' and 'bool')
63 | for (int i = 0; i < a.size(); i++) for (int j = 0; j < a.size(); j++) result[i][j] = i == j;
| ^
In file included from /usr/include/c++/10/vector:72,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from ltrominoes.cpp:15:
/usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<bool>; _Alloc = std::allocator<std::vector<bool> >]'
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'bool' to 'const std::vector<std::vector<bool> >&'
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from ltrominoes.cpp:15:
/usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<bool>; _Alloc = std::allocator<std::vector<bool> >]'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'bool' to 'std::vector<std::vector<bool> >&&'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::vector<bool>; _Alloc = std::allocator<std::vector<bool> >]'
730 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'bool' to 'std::initializer_list<std::vector<bool> >'
730 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
ltrominoes.cpp:64:16: error: could not convert 'result' from 'std::vector<std::vector<bool> > [(<anonymous> + 1)][(<anonymous> + 1)]' to 'std::vector<std::vector<bool> >'
64 | return result;
| ^~~~~~
| |
| std::vector<std::vector<bool> > [(<anonymous> + 1)][(<anonymous> + 1)]
ltrominoes.cpp:66:12: error: incompatible types in assignment of 'std::vector<std::vector<bool> >' to 'std::vector<std::vector<bool> > [(<anonymous> + 1)][(<anonymous> + 1)]'
66 | result = matexp(matmul(a, a), k / 2);
| ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
ltrominoes.cpp:67:37: error: could not convert '(std::vector<std::vector<bool> > (*)[(<anonymous> + 1)])(& result)' from 'std::vector<std::vector<bool> > (*)[(<anonymous> + 1)]' to 'std::vector<std::vector<bool> >'
67 | if (k % 2 == 1) result = matmul(result, a);
| ^~~~~~
| |
| std::vector<std::vector<bool> > (*)[(<anonymous> + 1)]
ltrominoes.cpp:68:12: error: could not convert 'result' from 'std::vector<std::vector<bool> > [(<anonymous> + 1)][(<anonymous> + 1)]' to 'std::vector<std::vector<bool> >'
68 | return result;
| ^~~~~~
| |
| std::vector<std::vector<bool> > [(<anonymous> + 1)][(<anonymous> + 1)]
ltrominoes.cpp: In function 'int main()':
ltrominoes.cpp:78:9: error: return-statement with no value, in function returning 'int' [-fpermissive]
78 | return;
| ^~~~~~
ltrominoes.cpp:81:29: error: 'n' was not declared in this scope
81 | sort(blocked, blocked + n);
| ^
ltrominoes.cpp:89:41: error: incompatible types in assignment of 'bool' to 'std::vector<std::vector<bool> > [(1 << w)]'
89 | for (int i = 0; i < w; i++) curr[i] = i == 0;
| ~~~~~~~~^~~~~~~~
ltrominoes.cpp:91:23: error: could not convert '(std::vector<std::vector<bool> > (*)[(1 << w)])(& curr)' from 'std::vector<std::vector<bool> > (*)[(1 << w)]' to 'std::vector<std::vector<bool> >'
91 | curr = matmul(curr, matexp(transition, blocked[currblock].second - 1 - currpos));
| ^~~~
| |
| std::vector<std::vector<bool> > (*)[(1 << w)]
ltrominoes.cpp:95:30: error: no match for 'operator=' (operand types are 'std::vector<std::vector<bool> >' and 'int')
95 | curr[0][i] = 0;
| ^
In file included from /usr/include/c++/10/vector:72,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from ltrominoes.cpp:15:
/usr/include/c++/10/bits/vector.tcc:198:5: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(const std::vector<_Tp, _Alloc>&) [with _Tp = std::vector<bool>; _Alloc = std::allocator<std::vector<bool> >]'
198 | vector<_Tp, _Alloc>::
| ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/10/bits/vector.tcc:199:42: note: no known conversion for argument 1 from 'int' to 'const std::vector<std::vector<bool> >&'
199 | operator=(const vector<_Tp, _Alloc>& __x)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
In file included from /usr/include/c++/10/vector:67,
from /usr/include/c++/10/functional:62,
from /usr/include/c++/10/pstl/glue_algorithm_defs.h:13,
from /usr/include/c++/10/algorithm:74,
from ltrominoes.cpp:15:
/usr/include/c++/10/bits/stl_vector.h:709:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::vector<_Tp, _Alloc>&&) [with _Tp = std::vector<bool>; _Alloc = std::allocator<std::vector<bool> >]'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:709:26: note: no known conversion for argument 1 from 'int' to 'std::vector<std::vector<bool> >&&'
709 | operator=(vector&& __x) noexcept(_Alloc_traits::_S_nothrow_move())
| ~~~~~~~~~^~~
/usr/include/c++/10/bits/stl_vector.h:730:7: note: candidate: 'std::vector<_Tp, _Alloc>& std::vector<_Tp, _Alloc>::operator=(std::initializer_list<_Tp>) [with _Tp = std::vector<bool>; _Alloc = std::allocator<std::vector<bool> >]'
730 | operator=(initializer_list<value_type> __l)
| ^~~~~~~~
/usr/include/c++/10/bits/stl_vector.h:730:46: note: no known conversion for argument 1 from 'int' to 'std::initializer_list<std::vector<bool> >'
730 | operator=(initializer_list<value_type> __l)
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
ltrominoes.cpp:99:19: error: could not convert '(std::vector<std::vector<bool> > (*)[(1 << w)])(& curr)' from 'std::vector<std::vector<bool> > (*)[(1 << w)]' to 'std::vector<std::vector<bool> >'
99 | curr = matmul(curr, matexp(transition, h - currpos));
| ^~~~
| |
| std::vector<std::vector<bool> > (*)[(1 << w)]
ltrominoes.cpp:100:18: error: could not convert 'curr[0][0]' from 'std::vector<std::vector<bool> >' to 'bool'
100 | if (curr[0][0]) cout << "YES";
| ~~~~~~~~~^
| |
| std::vector<std::vector<bool> >