cf/mirror

Score of a Tree

CF
1777D1900· candidate master2s512 MB⌨ stdin/stdout

Examples

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