One Punch XOR
CodeChefOpen on judge ↗
Saitama is the strongest man alive but he is afraid of XOR (Everyone has some kind of weakness). He has a starting value $K$ and decides to make an array using this initial value $K$. He keeps the first number of array as $K$ and then he takes a number $N$, and decides to add $N$ numbers to this array, such a way that the next number is $2^i$ more than the previous number. (Here $i$ is the index
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