AIZU ONLINE JUDGE King Mercer is the king of ACM kingdom. There are one capital and some cities in ...

Please Visit: http://ift.tt/1ajReyV



AIZU ONLINE JUDGE



King Mercer is the king of ACM kingdom. There are one capital and some cities in his kingdom.

Amazingly, there are no roads in the kingdom now. Recently, he planned to construct roads

between the capital and the cities, but it turned out that the construction cost of his plan is

much higher than expected.

In order to reduce the cost, he has decided to create a new construction plan by removing some

roads from the original plan. However, he believes that a new plan should satisfy the following

conditions:

For every pair of cities, there is a route (a set of roads) connecting them.

The minimum distance between the capital and each city does not change from his original

plan.

Many plans may meet the conditions above, but King Mercer wants to know the plan with

minimum cost. Your task is to write a program which reads his original plan and calculates the

cost of a new plan with the minimum cost.

http://ift.tt/Wc8pmd

http://ift.tt/1roQjtb



AIZU ONLINE JUDGE







from Public RSS-Feed of Jeffery yuan. Created with the PIXELMECHANICS 'GPlusRSS-Webtool' at http://gplusrss.com http://ift.tt/Wc8qGJ

via LifeLong Community

No comments:

Post a Comment