Happy Countings
CodeChefOpen on judge ↗
Santhosh Kumar is a very ambitious student at IIT Madras. He has multiple things to do , but he isn't able to decide what to pick. Therefore he decided to do the following: He has $N$ things to do. He assigns a number $a_i$ to each of these $N$ tasks. He constructs a new number by picking each bit of the new number at random from the corresponding bits of the $N$ numbers. Since he is rational, he
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