← All problemsSign in

Flappy Bird

CodeChefRating 2649Open on judge ↗

Chef is playing a noob version of the game Flappy Bird with the following rules: - The bird starts at a height $H$ at $x = 0$. - There are $N$ obstacles (numbered $1$ through $N$). For each valid $i$, the $i$-th obstacle is at a position $x_i$ and it has a height $h_i$. - For each integer $i$ ($0 \le i \lt x_N$), Chef has the option to click once when the bird is at $x = i$. Let's denote the bird'

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