dreaming.cpp: In function 'int travelTime(int, int, int, int*, int*, int*)':
dreaming.cpp:22:24: error: no matching function for call to 'fill(bool [(n + 1)], bool&, bool)'
22 | bool odw[n+1]; fill(odw,odw[n+1],false);
| ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/bits/specfun.h:45,
from /usr/include/c++/11/cmath:1935,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:41,
from dreaming.cpp:4:
/usr/include/c++/11/bits/stl_algobase.h:992:5: note: candidate: 'template<class _ForwardIterator, class _Tp> constexpr void std::fill(_ForwardIterator, _ForwardIterator, const _Tp&)'
992 | fill(_ForwardIterator __first, _ForwardIterator __last, const _Tp& __value)
| ^~~~
/usr/include/c++/11/bits/stl_algobase.h:992:5: note: template argument deduction/substitution failed:
dreaming.cpp:22:24: note: deduced conflicting types for parameter '_ForwardIterator' ('bool*' and 'bool')
22 | bool odw[n+1]; fill(odw,odw[n+1],false);
| ~~~~^~~~~~~~~~~~~~~~~~~~
In file included from /usr/include/c++/11/algorithm:74,
from /usr/include/x86_64-linux-gnu/c++/11/bits/stdc++.h:65,
from dreaming.cpp:4:
/usr/include/c++/11/pstl/glue_algorithm_defs.h:191:1: note: candidate: 'template<class _ExecutionPolicy, class _ForwardIterator, class _Tp> __pstl::__internal::__enable_if_execution_policy<_ExecutionPolicy, void> std::fill(_ExecutionPolicy&&, _ForwardIterator, _ForwardIterator, const _Tp&)'
191 | fill(_ExecutionPolicy&& __exec, _ForwardIterator __first, _ForwardIterator __last, const _Tp& __value);
| ^~~~
/usr/include/c++/11/pstl/glue_algorithm_defs.h:191:1: note: template argument deduction/substitution failed:
dreaming.cpp:22:24: note: variable-sized array type 'bool (&)[(n + 1)]' is not a valid template argument
22 | bool odw[n+1]; fill(odw,odw[n+1],false);
| ~~~~^~~~~~~~~~~~~~~~~~~~