Hi, The TR2 dynamic_bitset code is faulty. In the _M_do_left_shift implementation, the part responsible for clearing the rightmost blocks after a shift of at least block_size was commented out. It results in a wrong implementation of the shift operator. I haven't looked at the right shift. Example of code failing : https://codeforces.com/blog/entry/129454?#comment-1157392
Sincerely, Milan