-->
当前位置:首页 > 题库

PROGRAMMING:Little Gyro and Sort

Luz5年前 (2021-05-10)题库426
Little Gyro has just found an integer sequence $$a_ 1,a_ 2,...,a_ n$$   in his right pocket. As Little Gyro is bored, he decides to sort the sequence.
Now given an integer sequence, and its size is no more than $$10^6$$, please sort it within the ascending order.
### Input Specification:
There are multiple test cases. The first line of the input contains an integer $$T$$, indicating the number of test cases. For each test case:
The first line contains an integer $$n$$ (1 ≤ $$n$$ ≤ $$10^6$$), indicating the length of the sequence.
The second line contains  $$ n$$   integers $$a_ 1,a_ 2,...,a_ n$$ (1 ≤ $$a_ i$$ ≤ $$10^4$$), indicating the given sequence.
It's guaranteed that the sum of  $$ n$$   of all test cases will not exceed $$10^7$$.
Note: This problem has huge input data, use scanf instead of cin to read data to avoid time limit exceed.
### Output Specification:
For each test case output the sequence after sorting.
Note: Please, **DO NOT**   output extra spaces at the end of each line, or your answer may be considered incorrect!
### Sample Input:
```in
two
five
1 4 8 3 7
six
10000 9999 9998 9997 9996 9995
```
### Sample Output:
```out
1 3 4 7 8
9995 9996 9997 9998 9999 10000
```
### Hint:








answer:If there is no answer, please comment