← All problemsSign in

Walk to choco

In a Bakery, Chefs are selling chocolate. From $M$ bags filled with an infinite number of chocolate. The bags are arranged in a single row, equally spaced to be $1$ meter apart. There are $2$ Chefs that can pick up $1$ chocolate and transport it between any two bags. The Chefs take instructions in the form of queries consisting of two integers, $I_a$ and $I_b$, respectively. To execute a query,

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