Bhaag Mario Bhaag!
CodeChefOpen on judge ↗
Mario is stuck in an alternate universe where he has to complete a game in order to escape. The game goes like this: Mario starts with a health value $H$. There are $N$ gates, numbered $1$ to $N$, in front of mario. Behind each $i^{th}$ gate ($1 \le i \le N$), there is either a good berry to increase his health or a bad berry to decrease it. The amount by which health changes in $i^{th}$ gate is
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