cf/mirror

Subtree Removal Game

CF
2206B2500· grandmaster3s1024 MB⌨ stdin/stdout

Examples

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