Boxes
You are given an array $A$ of length $N$ such that: - $2\times (A_1 \oplus A_2 \oplus \ldots \oplus A_N) \geq (A_1 | A_2 | \ldots | A_N)$, where $\oplus$ and $|$ denote the bitwise [xor](https://en.wikipedia.org/wiki/Bitwise_operation#XOR) and [or](https://en.wikipedia.org/wiki/Bitwise_operation#OR) operations respectively. Your task is to perform the following operation until the array is empty:
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