← All problemsSign in

Dhoni is in a Dilemma

Dhoni is fondly known as Mr. Cool but he is in a lot of trouble these days. The opposing batsmen are constantly scoring runs. Thus Dhoni is worried about when to take a powerplay such that runs scored by the opposite teams can be minimized. More precisely, he wants to take a powerplay in those stretch of the overs in which XOR of the runs (in those overs) scored by the opposing team is minimum. N

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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start