【JZOJ A組】巡邏

Description Input Output Sample Input 7 4 6 4 2 1 Sample Output 3 5 6 4 2 1 7 Data Constraint 思路 這其實類似於歸併 要求字典序需最小,肯定把小的往前塞。 建兩個隊列,一個是題目的輸入,一個是剩下的書從小到大排序。 做一次歸併即可 代碼 #include<iostream> #include<cstdio
相關文章
相關標籤/搜索