cf/mirror

Minimum Diameter Tree

CF
1085D1700· expert1s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4 3
1 2
1 3
1 4
Output
2.000000000000000000
Sample 2of 3
Input
6 1
2 1
2 3
2 5
5 4
5 6
Output
0.500000000000000000
Sample 3of 3
Input
5 5
1 2
2 3
3 4
3 5
Output
3.333333333333333333
1085D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…