cf/mirror

Restore the Permutation

CF
1759G1900· candidate master1s256 MB⌨ stdin/stdout

Examples

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