标签:
你有两个序列\{a_1,a_2,...,a_n\}{a?1??,a?2??,...,a?n??}和\{b_1,b_2,...,b_n\}{b?1??,b?2??,...,b?n??}. 他们都是11到nn的一个排列. 你需要找到另一个排列\{p_1,p_2,...,p_n\}{p?1??,p?2??,...,p?n??}, 使得序列\{a_{p_1},a_{p_2},...,a_{p_n}\}{a?p?1????,a?p?2????,...,a?p?n????}和\{b_{p_1},b_{p_2},...,b_{p_n}\}{b?