Small Permutation Problem (Hard Version)
1909F22500· grandmaster2s256 MB⌨ stdin/stdout
Examples
Sample 1of 1multi-test • hover to link
Input
105-1 -1 -1 -1 -151 2 3 4 560 2 2 2 -1 -16-1 -1 -1 -1 -1 56-1 -1 3 2 -1 -1150 0 -1 -1 -1 2 2 -1 -1 -1 -1 9 11 13 1560 2 2 2 4 660 1 3 4 5 561 2 3 2 4 6150 0 1 1 1 2 3 4 5 6 7 9 11 13 15
Output
1201400494403526400532305727
58%
1909F2.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)