Introduction - If you have any usage issues, please Google them yourself
acm algorithm design:【FLOYD algorithm】Renting Boats
Description: Yangtze River Yacht Club has set up in the Yangtze River on a yacht rental n points 1,2, ..., n. Visitors can stand in these yacht rental yacht rental, and any one of the lower reaches of the return of yacht rental yacht station. Yacht rental yacht rental station i to station j rent between r (i, j), 1 < = i < j < = n. Try to design an algorithm to calculate from the yacht rental yacht rental station 1 to station n at least required to rent. Input: line 1 have a positive integer n (n < = 200), said there are n-yacht rental station. The next n-1 line is r (i, j), 1 < = i < j < = n.
Output: from the yacht rental yacht rental station 1 to station n at least required for the importation of rent cases:
3
5,15
7
cases output: 12