cf/mirror

Dreamoon Likes Permutations

CF
1330B1400· specialist2s256 MB⌨ stdin/stdout

Examples

Sample 1of 1
Input
6
5
1 4 3 2 1
6
2 4 1 3 2 1
4
2 1 1 3
4
1 3 3 1
12
2 1 3 4 5 6 7 8 9 1 10 2
3
1 1 1
Output
2
1 4
4 1
1
4 2
0
0
1
2 10
0
1330B.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)