Problem 82 template
-just going to use dijkstras again