标签: 线性基

「AtCoder 141F」Xor Sum 3

We have N non-negative integers: A1,A2,…,AN.

Consider painting at least one and at most N−1 integers among them in red, and painting the rest in blue.

Let the beauty of the painting be the [mbox][mbox]XOR of the integers painted in red, plus the [mbox][mbox]XOR of the integers painted in blue.

Find the maximum possible beauty of the painting.