1195: 插入

Memory Limit:0 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:318 Solved:153

Description

依次输入n个数(从小到大排列),再输入一个数,将其插入到这组数中,使其依然有序,再输出。

Input

第一行一个数n(n<100)
第二行n个int范围以内的数,之间以空格隔开
第三行输入要插入的数

Output

插入后,仍然有序的数列

Sample Input Copy

5
1 3 5 7 9
4

Sample Output Copy

1 3 4 5 7 9

加入题单

算法标签: