Monotone shortest paths
Given a finite directed weighted graph, a source vertex `s`, and the graph's edge weights, compute the shortest monotone-path distance from `s` to every vertex. A path is monotone if its edge weights are **strictly increasing** or **strictly decreasing**. For each destination, return the smaller distance among the two kinds of monotone paths. The empty path from `s` to itself has distance `0`.