Waiting in Queue
CodeChefOpen on judge ↗
Chef has opened his new restaurant and made the first meal free for everyone! You want to try the new restaurant, but since it is offering free meals, many people are coming and a huge queue has formed. Currently (at time $T=0$), there are $M$ people waiting in the queue. You also know that there are $N$ more people coming; let's denote the time when the $i$-th person stands at the back of the qu
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