cf/mirror

Doremy's Swapping Trees

CF
1889E3500· legendary gm2s1024 MB⌨ stdin/stdout

Examples

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