← All problemsSign in

Lets Race!

You are invited to participate in a special race as a part of Quark'23. The layout of this race is in the form of an $N * M$ grid. Each cell of the grid $(i,j)$ contains a sufficient supply of balls with the number $A_{i,j}$ written on them. Each contestant is given a bag. When a contestant is standing on a cell, they **must** pickup **exactly** 1 ball from that cell and add it to their bag. The

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