2019: 归并排序

Memory Limit:128 MB Time Limit:1.000 S
Judge Style:Text Compare Creator:
Submit:7 Solved:4

Description

输入n个数据元素,使用分治中的归并排序算法进行排序(从小到大)。

Input

第一行为测试用例个数T
第二行为第Ti个测试用例的数据元素个数N
第三行为Ti个测试用例的N个数据元素

Output

第i行为已经排好序第Ti个测试用例的N个数据元素。

Sample Input Copy

1
8
42 15 20 6 8 38 50 12

Sample Output Copy

6 8 12 15 20 38 42 50

Source/Category