a958: Sorting
Tags :
Accepted rate : 6人/52人 ( 12% ) [非即時]
評分方式:
Tolerant

最近更新 : 2023-09-14 12:19

Content

Given an array $a$ of size $n$, sort it by ascending order.

Input

Each test contains multiple test cases. The first line contains the number of test cases t (1 ≤ t ≤ 20). Description of the test cases follows.

The first line of each test case contains one integer $n$ (2 ≤ n ≤ 200000)  -- the length of $a$

The second line of each test case contains $n$ positive integers $a_1, a_2, ..., a_n (1 \leq a_i \leq 10^9)$ -- the elements of $a$

Output

For each test case, output $a$ sorted by ascending order. Separate each element with space.

Sample Input #1
5
3
2 3 1 
9
9 3 57 5 1 34 233 438 2 
5
1 9 3 5 7 
3
34889834 234959832 1924728 
7
9 3 4 1 5 3 3 
Sample Output #1
1 2 3 
1 2 3 5 9 34 57 233 438 
1 3 5 7 9 
1924728 34889834 234959832 
1 3 3 3 4 5 9 
測資資訊:
記憶體限制: 64 MB
不公開 測資點#0 (5%): 1.0s , <1M
不公開 測資點#1 (5%): 1.0s , <1M
不公開 測資點#2 (5%): 1.0s , <1M
不公開 測資點#3 (5%): 1.0s , <1M
不公開 測資點#4 (5%): 1.0s , <1M
不公開 測資點#5 (7%): 1.0s , <50M
不公開 測資點#6 (7%): 1.0s , <50M
不公開 測資點#7 (7%): 1.0s , <50M
不公開 測資點#8 (7%): 1.0s , <50M
不公開 測資點#9 (7%): 1.0s , <50M
不公開 測資點#10 (10%): 0.5s , <50M
不公開 測資點#11 (10%): 0.5s , <50M
不公開 測資點#12 (10%): 0.5s , <50M
不公開 測資點#13 (10%): 0.5s , <50M
Hint :
Tags:
出處:
[管理者: ]


ID User Problem Subject Hit Post Date
1324
1166286-7@g.... (S5A36劉鍵楠)
a958
228 2023-09-18 22:15