SP21353 CLZDOUGH - Avantgarde and Doughnut
Description
Recently Mr.Avantgarde has been assigned the task of delivering doughnuts .He borrowed an electric car for this task.There are N houses and each house has a charging station. There is at least one path of roads connecting each pair of houses. A trip from one house to any other must be completed using at most C rechargings. Car should always be recharged at the beginning of each trip(this counts as one of the C rechargings).As you know that Mr.Avantgarde is a lazy guy, Given the road network and C, compute the minimum range required of the electric car.
Note: With one recharging, the car can travel a distance equal to its range.
Input
Input begins with one integer T (0 < T< 6) denoting the number of test cases. Each test case begins with a line containing three integers N, C, and M (1 < N < 101, 0 < C < 101), where N and C are number of houses and number of rechargings. Next follow M lines each with three integers u, v and d (0
Input Format
N/A
Output Format
N/A