AMIT AND HIS GIRLFRIENDS XOR GAME
CodeChefOpen on judge ↗
Chef Amit likes to play with numbers. So his girlfriend gifted him an array of numbers of size n+1 consisting of all non-negative integer numbers starting with 0 , i.e. {0,1,2,...,n}. Now she Challenged chef to find a pair of numbers in the list with maximum XOR. Since chef is busy, he is asking for your help. Input The first line of the input has a single integer T denoting the test cases. Each
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