cf/mirror

Permutation Minimization by Deque

CF
1579E11000· newbie2s256 MB⌨ stdin/stdout

Examples

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