#11463 - Commandos

Solved By:wesley
Theory Difficulty:easy
Coding Difficulty:easy
Algorithms Used:floyd warshall
Solution Description: With infinite soldiers, you may as well send each one out to a different building. Let s and t be the start and end locations. Let d[i][j] be the distance between i and j. This ith soldier needs d[s][i] + d[i][t] time to complete his mission.

So, the answer is the maximum across all 0 <= i < n of d[s][i] + d[i][t].






Copyright 2008 (c) QuestToSolve.Com - Graphs Powered By PHPGraphLib - Click For Official Site