← All problemsSign in

Karan goes to McDonalds

Karan is at McDonalds presently. There are total $N$ counters where he can place his order. There are $A_i$ people already present at each counter to get their order. Each counter gives the order to one person in **one** minute. Initially, Karan stands in front of the first counter. After each minute, if he doesn't get his order, he moves on to the next counter to get his order. If he is at cou

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