Path Queries
1213G1800· expert3s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
7 51 2 13 2 32 4 14 5 25 7 43 6 25 2 3 4 1
Output
21 7 15 21 3
Sample 2of 3
Input
1 21 2
Output
0 0
Sample 3of 3
Input
3 31 2 12 3 21 3 2
Output
1 3 3
58%
1213G.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…