cf/mirror

Unshuffling a Deck

CF
1427D2000· candidate master1s256 MB⌨ stdin/stdout

Examples

Sample 1of 3
Input
4
3 1 2 4
Output
2
3 1 2 1
2 1 3
Sample 2of 3
Input
6
6 5 4 3 2 1
Output
1
6 1 1 1 1 1 1
Sample 3of 3
Input
1
1
Output
0
1427D.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)