#P9160. Two Permutations

Two Permutations

Source: Super League of Chinese College Students Algorithm Design 2022, Contest 3 by Claris.