TopCoder

Adrien Wu
$ \begin{align} AC \times 2^9 \\ \text{New TIOJ ?} \end{align} $

User's AC Ratio

95.8% (137/143)

Submission's AC Ratio

65.2% (191/293)

Tags

Description

給一堆數字,是1~N的一個隨機排列, 將它們重新從小到大排序好。

Input Format

輸入包含多組測資

每組測資有兩行,第一行為N(N≤100000)

第二行為一個1~N的隨機排列, 數字間以空格分開。

當N為0時代表輸入結束。

Output Format

輸出排序後的結果,每組測資一行。

Sample Input 1

1
1
2
1 2
3
3 2 1
0

Sample Output 1

1
1 2
1 2 3

Hints

Problem Source

原TIOJ1328 / TFcis10 留社考。Problem Setter:seanwu

Subtasks

No. Testdata Range Score
1 0 100

Testdata and Limits

No. Time Limit (ms) Memory Limit (VSS, KiB) Output Limit (KiB) Subtasks
0 1000 65536 262144 1