Problem reachability2
User kingdavidfriend
Submission Time 2026-02-26 16:34:21
Score 0
Max Time N/A
Max Memory N/A

Compile Error

reachability2.cpp: In function ‘void solve(int, int)’:
reachability2.cpp:21:24: error: no match for ‘operator|=’ (operand types are ‘std::vector<bool>::reference’ {aka ‘std::_Bit_reference’} and ‘std::vector<bool>::reference’ {aka ‘std::_Bit_reference’})
21 | tmp[k] |= dp[x][k];
| ~~~~~~~^~~~~~~~~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:45,
from reachability2.cpp:1:
/usr/include/c++/9/cstddef:144:3: note: candidate: ‘constexpr std::byte& std::operator|=(std::byte&, std::byte)’
144 | operator|=(byte& __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/9/cstddef:144:20: note: no known conversion for argument 1 from ‘std::vector<bool>::reference’ {aka ‘std::_Bit_reference’} to ‘std::byte&’
144 | operator|=(byte& __l, byte __r) noexcept
| ~~~~~~^~~
In file included from /usr/include/c++/9/ios:42,