cf/mirror

Swaps in Permutation

CF
691D1700· expert5s256 MB⌨ stdin/stdout

Examples

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