Palindromic Hamiltonian Path
1569F3000· legendary gm5s256 MB⌨ stdin/stdout
Examples
Sample 1of 3
Input
4 3 31 22 33 4
Output
9
Sample 2of 3
Input
4 6 31 21 31 42 32 43 4
Output
21
Sample 3of 3
Input
12 19 121 32 63 63 74 88 58 79 45 910 110 410 69 1011 15 117 1112 212 512 11
Output
456165084
58%
1569F.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
loading graph engine…