Electric Car Rally

From programming_contest
Jump to navigation Jump to search

State explosion. State is

  1. which city we're in (500)
  2. how much juice we have (240)

Value is what's the earliest we can arrive with that amount of juice.

Simply Dijkstra through the states, taking all 20 possible "travel lines" out of the state, or charging up.