Even Subset Xor
A number $X$ is called *bad* if its binary representation contains odd number of $1$ bits. For example, $X = 13 = (1101)_2$ is bad while $X = 3 = (11)_2$ is not bad. Chef calls an array $A$ of length $N$ **special** if the following conditions hold: - For each $1 \le i \le N$, $0 \le A_i \lt 2^{20}$ - All the elements of $A$ are **distinct** - There does not exist any non-empty [subset](https://e
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start