Appending Permutations (Hard Version)
2124F22800· international gm3s1024 MB⌨ stdin/stdout
Examples
Sample 1of 2multi-test • hover to link
Input
73 03 31 12 13 13 21 12 16 22 34 22 31 22 21 14 32 23 24 23 22 33 3
Output
70165045
Sample 2of 2multi-test • hover to link
Input
15000 169 420
Output
886908216
58%
2124F2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)