Petr and Permutations - 987E - Codeforces
Petr and Permutations - 987E - Codeforces

https://codeforces.com/contest/987/problem/E

The thing to see was the 3n swaps and 7n+1 swaps will
generate permutations of different parity. Nice observation.

Gurpreet gave me a more intuitive solution to this too.
Involved basically creating the permutation given in
minimum swaps and checking the parity of the remaining
swaps (which should be even).

paramsingh/codechef-solutions,paramsingh/cp,paramsingh/cp,paramsingh/cp,paramsingh/cp,paramsingh/codechef-solutions,paramsingh/codechef-solutions,paramsingh/codechef-solutions,paramsingh/cp