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.
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.