cf/mirror

Complete the Permutations

CF
715E3400· legendary gm5s256 MB⌨ stdin/stdout

Examples

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