题目描述
Farmer John's farm has anoutdated network of M pipes (1 <= M <= 500) for pumping milk from thebarn to his milk storage tank. He wants to remove and update most of these overthe next year, but he wants to leave exactly one path worth of pipes intact, sothat he can still pump milk from the barn to the storage tank.
The pipe network is described by N junction points (1 <= N<= 500), each of which can serve as the endpoint of a set of pipes. Junctionpoint 1 is the barn, and junction point N is the storage tank. Each of the Mbi-directional pipes runs between a pair of junction points, and has anassociated latency (the amount of time it takes milk to reach one end of thepipe from the other) and capacity (the amount of milk per unit time that can bepumped through the pipe in steady sta