#D8572. Longest Shortest Path
Longest Shortest Path
Longest Shortest Path
Example
Input
3 2 3 1 3 1 2 2 1 2 3 1 2
Output
6.0000000
inputFormat
Input
3 2 3 1 3 1 2 2 1 2 3 1 2
outputFormat
Output
6.0000000
样例
3 2 3 1 3
1 2 2 1
2 3 1 2
6.0000000