Mart Master II
Time Limit: 12000/6000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 285 Accepted Submission(s): 94
Problem Description
Trader Dogy lives in city S, which consists of n districts. There are n – 1 bidirectional roads in city S, each connects a pair of districts. Indeed, city S is connected, i.e. people can travel between every pair of districts by roads.
In some districts there are marts founded by Dogy’s competitors. when people go to marts, they’ll choose the nearest one. In cases there are more than one nearest marts, they’ll choose the one with minimal city number.
Dogy’s money could support him to build only
one
new marts, he wants t
版权声明:本文为u012358934原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。