Li Hua and Tree
1797D1900· candidate master2s256 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
7 41 1 1 1 1 1 11 21 32 42 53 66 71 62 31 61 2
Output
233
Sample 2of 2
Input
10 14-160016413 -90133231 -671446275 -314847579 -910548234 121155052 -359359950 83112406 -704889624 1454893031 61 1010 81 43 42 72 53 29 81 42 22 41 41 102 101 91 62 82 101 51 81 12 5
Output
-2346335269-314847579-476287915-704889624121155052-1360041415228601709-2861484545
58%
1797D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…