My XOR
CodeChefOpen on judge ↗
You have given an array $A$ of length $N$ consisting of positive integers and an integer $X$. You have to find a pair of two integers in A such that the $XOR$ of the integers in that pair is equal to $X$. If multiple such pair are there, print a pair whose minimum value is minimum along all other pairs. i.e. If pairs are - (2,5) , (3,7), (4,8) print $2$ $5$ as 2 is minimum among all other pairs.
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