Is is a good solution. O(cities * persons). I don'...
# stdlib
m
Is is a good solution. O(cities * persons). I don't think you can find better. Maybe by having less steps and by using Sequene.