cf/mirror

Make a Permutation!

CF
864D1500· specialist2s256 MB⌨ stdin/stdout

Examples

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