cf/mirror

Minimal Diameter Forest

CF
1092E2000· candidate master2s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4 2
1 2
2 3
Output
2
4 2
Sample 2of 3
Input
2 0
Output
1
1 2
Sample 3of 3
Input
3 2
1 3
2 3
Output
2
1092E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…