Codeforces Round #656 (Div. 3) B. Restore the Permutation by Merger
Apermutationoflengthnnisasequenceofintegersfrom11tonnoflengthnncontainingeachnumberexactlyonce.Forexample,[1][1],[4,3,5,1,2][4,3,5,1,2],[3,2,1][3,2,1]arepermutations,and[1,1][1,1],[0,1][0,1],[2,2,1,4]