Java's BitSet class implements a vector of bit values (i.e.: () or ()) that grows as needed, allowing us to easily manipulate bits while optimizing space (when compared to other collections). Any element having a bit value of is called a set bit.
Given BitSets, and , of size where all bits in both BitSets are initialized to , perform a series of operations. After each operation, print the number of set bits in the respective BitSets as two space-separated integers on a new line.
The first line contains space-separated integers, (the length of both BitSets and ) and (the number of operations to perform), respectively.
The subsequent lines each contain an operation in one of the following forms: