Mobile Game
CodeChefOpen on judge ↗
Chef is playing a mobile game . There are ($N$ + $1$) bars numbered from $0$ to $N$ in this game. The bars with number 0 has zero height, the bar with number $i$ (i > 0) has height $Hi$. The final destination of the game is to reach $N$-th bar, and the only move the player can do is to jump from the current bar (let's denote its number as k) to the next one (its number will be k + 1). When the pla
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