cf/mirror

Premutation

CF
1790C1000· newbie3s256 MB⌨ stdin/stdout

Examples

Sample 1of 1multi-test • hover to link
Input
5
4
4 2 1
4 2 3
2 1 3
4 1 3
3
2 3
1 3
1 2
5
4 2 1 3
2 1 3 5
4 2 3 5
4 1 3 5
4 2 1 5
4
2 3 4
1 3 4
1 2 3
1 2 4
3
2 1
1 3
2 3
Output
4 2 1 3
1 2 3
4 2 1 3 5
1 2 3 4
2 1 3
1790C.cpp
loading editor…
Ln 11·137 BGNU C++20 (64)