Tree Queries
1904E2500· grandmaster4s512 MB⌨ stdin/stdout
Examples
Sample 1of 2
Input
7 71 21 33 42 52 66 72 02 1 12 2 1 63 1 43 1 15 05 2 1 6
Output
3214141
Sample 2of 2
Input
4 41 21 32 42 1 33 1 42 1 42 3 1 3 4
Output
1220
58%
1904E.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…