cf/mirror

Permutation recovery

CF
1158C2100· master1s256 MB⌨ stdin/stdout

Examples

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