← All problemsSign in

Restock

CodeChefRating 2088Open on judge ↗

The chef has to replenish supplies in the kitchen. He divided the kitchen floor into a rectangular grid of cell with N rows and M columns. All coordinates in this problem are 0-indexed and in the form (row, column). The supplies will be delivered to the cell (R,C) and have to be moved to the storage, which is located in the cell (0,0). The chef will organize his employees so that they can pass ind

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