cf/mirror

Yet Another Permutation Constructive

CF
1958E1900· candidate master2s512 MB⌨ stdin/stdout

Examples

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