Difficulty: top few teams will probably solve it (so like 3%).

Solution:

The optimal path goes via 0, 1 or 2 stations on the map. Say
the path is SRC->S1->S2->DEST.

A piece SRC->S1 can go directly (walking, trivial) or via a
station on the boundary. Figuring out the optimal time via
the boundary takes a bit of math (optimizing a function or
via refraction indices).
