TopCoder

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

User's AC Ratio

96.0% (143/149)

Submission's AC Ratio

65.9% (199/302)

Tags

Description

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

Input Format

輸入包含多組測資

每組測資有兩行,第一行為 $N$($N≤10^ 5$)

第二行為一個 $1\sim 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