Rosetta Problems

Two Permutations

https://atcoder.jp/contests/agc038/tasks/agc038_f