cf/mirror

Paths on the Tree

CF
1746D1900· candidate master3s256 MB⌨ stdin/stdout

Examples

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