Permutation Minimization by Deque
1579E11000· newbie2s256 MB⌨ stdin/stdout
Examples
Sample 1of 1
Input
543 1 2 433 2 133 1 221 222 1
Output
1 3 2 41 2 31 3 21 21 2
58%
1579E1.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)
543 1 2 433 2 133 1 221 222 1
1 3 2 41 2 31 3 21 21 2