The Bird in a Nest
CodeChefOpen on judge ↗
In Sammy's childhood, he usually liked to observe some little things for tickling his little curiosity. He often found it interesting to visit every nest watch the movement of a group of birds in the nest. Sammy finds there are n nests and m birds in a nest now. Because of his careful observation, he knows all birds' behaviors, the i-th bird want to travel from one nest si to another nest
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