Problem 3630 · Hard

Partition Array for Maximum XOR and AND

Send each element to A, B or C; track the set of reachable (XOR of A, AND of B, XOR of C) states one element at a time.

Open the interactive visualisation