2014b专题

【Good Bye 2014B】【Floyd or 并查集】New Year Permutation 全排列有位置交换序列 使得字典序尽可能小

New Year Permutation time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output User ainta has a permutation p1, p2, ..., pn. As