摘要: Young Maids Description 给定一个排列,每次选出相邻的两个放在队头,要求字典序最小。 Input 第一行一个整数n,第二行n个数表示这个排列。 Output n个数表示答案。 Sample Input 8 4 6 3 2 8 5 7 1 Sample Output 3 1 2 阅读全文
posted @ 2017-12-01 21:49 BearChild 阅读(320) 评论(0) 推荐(0) 编辑