← All problemsSign in

Dragonado And XOR

CodeChefRating 2480Open on judge ↗

Dragonado rarely gets stuck on a problem, unless of course, if it's a XOR Problem. Dragonado while coming back from the Fruit Market, finds an array $A$ of $N$ elements. He wants to find $4$ integers, say $i_1,i_2,i_3$ and $i_4$, such that: - $\texttt{popcount}(A_{i_1} \oplus A_{i_2}) = \texttt{popcount}(A_{i_3} \oplus A_{i_4})$ - $ 1 \le i_1,i_2,i_3,i_4 \le N $ and $ i_1,i_2,i_3,i_4 $ are pai

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start