Problem1347--【数组】有序数列(order)

1347: 【数组】有序数列(order)

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 211  Solved: 71
[Status] [Submit] [Creator:]

Description

将一个整数X插入到N个有序的数列中,插入后数列仍然有序。

Input

共三行,第一行一个整数n(n<100000),表示有n个有序的整数(小于32767);第二行n个有序的整数序列(从小到大);第三行,插入有序序列中的整数X。

Output

一行,插入整数X后的有序序列。

Sample Input Copy

5
3 8 10 15 19
6

Sample Output Copy

3 6 8 10 15 19

Source/Category