- shortest paths
- binary search
- maximum cardinality matching
We begin by constructing a directed weighted graph of all positions, slopes and lifts. We duplicate each shelter
Next, we compute for each agent its shortest path to all of the shelters. This can be done in
Finally, we do a binary search over all non-negative integers. In each iteration, we construct a matching graph of all agents and all shelters. We add an edge for each pair whose distance is less than