Give those children some toys!
CodeChefOpen on judge ↗
There are n children in a school with their roll numbers from 1 to n. Each of those children has x number of storybooks and y number of toys. Now the school admin has decided to give toy cars to these children but due to a shortage of toy cars, the school has decided to arrange the children in a specific order 1. Children with fewer toys are preferred first. 2. In case the children have the
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