Find the XOR
CodeChefOpen on judge ↗
Its Christmas time and Santa wants to distribute presents in your city. The city is a straight line with houses numbered 1 to $n$, where $n$ is the number of houses. Initially all the houses have 0 presents. Santa can perform two types of tasks: - $1$ $i$:Santa drops a present in the $ith$ house. - $2$ $i$: Santa calculates magic number for the $ith$ house. The magic number for the $ith$ hou
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