Guests like slippers
Miana and Serdenopis have guests for dinner tonight and thus they have prepared $N$ pairs of slippers for their guests (who shall take off their shoes before entering the house). The slippers are on a line and the $i$-th pair of slippers has size $S_i$. When a guest enters, he takes the first pair of slippers which are still in the line (i.e., they are not taken by a previous guest) and are big e
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