Security Lines
The airport in Chefland is a busy place! Today, we'll take a look at its security queues. There are $N$ security queues, numbered $1$ to $N$. Initially, there are $A_i$ people standing in the $i$-th queue. You are the last person in the the first queue, i.e. the $A_1$-th person in queue $1$. Every second, the following will happen: 1. First, you will either stay in the same queue, or move to a
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