Caterpillar on a Tree
1918F2500· grandmaster2s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
8 11 1 2 2 4 3 3
Output
9
Sample 2of 2
Input
4 04 4 1
Output
4
58%
1918F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…
8 11 1 2 2 4 3 3
9
4 04 4 1
4