Shirin and Shoes
CodeChefOpen on judge ↗
Shirin and her sister Doodi visited a mall to buy some shoes , but seeing a sale they got excited and brought $N$ shoes so that they can distribute it among their $K$ friends. You can give any friend a pair of shoes if both the shoes are of the same type. A valid distribution is when no friend has 2 pairs of the same type. You can not give any of your friends' a single shoe. You are given 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