cf/mirror

You Are Given a Tree

CF
1039D2800· international gm7s512 MB⌨ stdin/stdout

Examples

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