The Take Over
CodeChefOpen on judge ↗
Help Khaleesi (*bend your knee first), to take over the Iron Throne from Robert Baratheon by solving her problem. There are $M$ kingdoms filled with an infinite number of people. The kingdoms are arranged in a single row, equally spaced to be $1$ mile apart. You, as Daenerys’s hand of the Queen have her $2$ dragons to help you; Rhaegal and Viserion. Both the dragons can pick up $1$ person at
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