Problem 1057 · Medium

Campus Bikes

Give each worker the closest free bike by Manhattan distance, taking pairs from shortest to longest with index tie-breaks.

Open the interactive visualisation