Distinctive Roots in a Tree
1467E2500· grandmaster3s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
52 5 1 1 41 21 32 42 5
Output
3
Sample 2of 2
Input
52 1 1 1 41 21 32 42 5
Output
0
58%
1467E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…