Tree Shuffling
1363E2000· candidate master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
51 0 120 1 0300 0 14000 0 050000 1 01 22 32 41 5
Output
4
Sample 2of 3
Input
510000 0 12000 1 0300 0 140 0 01 1 01 22 32 41 5
Output
24000
Sample 3of 3
Input
2109 0 1205 0 11 2
Output
-1
58%
1363E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…