cf/mirror

Tree Cutting

CF
1946C1600· expert3s512 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
6
5 1
1 2
1 3
3 4
3 5
2 1
1 2
6 1
1 2
2 3
3 4
4 5
5 6
3 1
1 2
1 3
8 2
1 2
1 3
2 4
2 5
3 6
3 7
3 8
6 2
1 2
2 3
1 4
4 5
5 6
Output
2
1
3
1
1
2
1946C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…