← All problemsSign in

Miu Meets Itachi

There is an ice-cream sale where $N$ kinds of ice-creams are being sold for free! Miu - The smart cat loves the ice-cream of the $K$th kind. Initially, there are $A$ number of ice-cream cups of the $K$th kind. She is standing in a queue, where exactly $P$ people are standing ahead of her. Each of these people pick up **exactly one** cup of their favourite kind of ice-cream. If there is no cup lef

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