Bicycles
HardRating 1800CodeforcesShortest Paths & Topological Sort
Approach hintTry it first, then revealHide
The cost of every later road depends on the best bike collected so far, so make the Dijkstra state (city, bike in use). With n up to 1000 there are about n^2 states, which fits comfortably.