cf/mirror

Polycarp Recovers the Permutation

CF
1611C1000· newbie2s256 MB⌨ stdin/stdout

Examples

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