← All problemsSign in

Full Barrier Alchemist

CodeChefRating 1426Open on judge ↗

Edward Elric is chasing after Scar. To stop Edward, Scar creates $N$ barriers in the way, numbered from $1$ to $N$. Each barrier Scar created is either one of the following two types. - Type 1 barrier - This barrier starts from a height $X$ above the ground and extends till the sky. - Type 2 barrier - This barrier starts from the ground and extends up to height $X$ above the ground. The height of

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