cf/mirror

Tokitsukaze and Permutations

CF
1677D2500· grandmaster2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
3
5 0
0 1 2 3 4
5 2
-1 1 2 0 0
5 2
0 1 1 0 0
Output
1
6
6
1677D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)