1050: 合并单链表

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:130 Solved:80

Description

创建两个有序单链表,然后,把这两个有序单链表合并成一个有序单链表。

Input

第一行:第一个单链表的元素个数
第二行:输入第一个有序单链表。
第三行:第二个单链表的元素个数
第四行:输入第二个有序单链表。

Output

第一行:输出合并之后的单链表。

Sample Input Copy

5
1 2 4 5 6
4
3 7 8 9

Sample Output Copy

1 2 3 4 5 6 7 8 9

Source/Category