Electric Car Rally

From programming_contest
Revision as of 06:46, 27 August 2016 by imported>Kmk21
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
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.