Problem 1575 · Hard

Count All Possible Routes

Memoize the number of routes from each city and fuel level, since a route may revisit cities and pass through the finish.

Open the interactive visualisation