The Lost Array
JJ had an array $A$ of length $N$ such that $0 \le A_i \lt 2^{30}$ for all $1 \le i \le N$. He listed down the [XOR](https://en.wikipedia.org/wiki/Bitwise_operation#XOR) of all the [subsequences](https://en.wikipedia.org/wiki/Subsequence) of $A$ of size $\ge (N - 1)$ in some **random** order. Let's call the XOR of these $(N + 1)$ subsequences as $B_1, B_2, \ldots, B_{N+1}$. Unfortunately, he lo
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