Problem hld
User jmuzhen
Submission Time 2024-12-22 22:36:01
Score 0
Max Time N/A
Max Memory N/A

Compile Error

hld.cpp: In member function ‘void LinkCut::makeRev(int)’:
hld.cpp:36:16: error: no match for ‘operator^=’ (operand types are ‘std::vector<bool>::reference’ {aka ‘std::_Bit_reference’} and ‘int’)
36 | rev[x] ^= 1;
| ~~~~~~~^~~~
In file included from /usr/include/x86_64-linux-gnu/c++/9/bits/stdc++.h:45,
from hld.cpp:1:
/usr/include/c++/9/cstddef:172:3: note: candidate: ‘constexpr std::byte& std::operator^=(std::byte&, std::byte)’
172 | operator^=(byte& __l, byte __r) noexcept
| ^~~~~~~~
/usr/include/c++/9/cstddef:172:20: note: no known conversion for argument 1 from ‘std::vector<bool>::reference’ {aka ‘std::_Bit_reference’} to ‘std::byte&’
172 | operator^=(byte& __l, byte __r) noexcept
| ~~~~~~^~~
In file included from /usr/include/c++/9/ios:42,
from /usr/include/c++/9/istream:38,
from /usr/include/c++/9/sstream:38,