PLAY THE GAME
CodeChefOpen on judge ↗
Ganesh, is playing a Cricket18 game in his PC. He is good at playing cricket on the field but not on the computer. He swings the bat alternatively on the off side and on the leg side. He can survive without losing his wicket if he swings his bat towards the off side for an out-swinging delivery and swings his bat towards legside for an in-swinging delivery. An in-swinging delivery is denoted by
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