← All problemsSign in

Mobile Game

Chef likes to play games on his new phone. He just downloaded a new game, in which there are three rules. ``` $1:$ You get $1$ point if you lose on a level $2:$ You get A[i] points if you win at $i th$ level $3:$ Whether you win or lose you are sent to next level ``` ``` ``` At the end, the final score is the product of scores of all the levels. Chef wins the game if his final score

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