P1017 Mission 1 - II : The Ques of the Guards
Difficulty: 1050
Problem Background
Radar finally passed the road successfully and safely! Now he’s at the CZYAKIOI (the CZY Accepted Kingdom IOI Campus, you know)’s Capital City and is ready to enter. But as it is the CZYAKIOI‘s capital, it’s not very easy to enter. You must answer a question from the guards.
When Radar get to the Gate, the Guards are playing a Math Game. So they give Radar a question related to easy Math…
Problem Statement
The Guards give Radar a set of n integers {A1,A2,A3,⋯,An−2,An−1,An}, and Radar needs to sort them into a ascending sequence, and then tell the Guards what it is.
Yeah, it is just this?
Input
The Input is given from Standard Input (stdin) in the Following Format:
n
A1 A2 A3 A4 ⋯ AN−2 AN−1 AN
Output
Print one line with n integers: the sorted sequence.
Samples
Input 1
Output 1
Input 2
Output 2
Input 3
Output 3
Input 4
Output 4
Constraints
- All the Input are Integers.
- For all test cases:
- 1≤n≤(2×105)
- 1≤Ai≤(10102)
- This Problem Has Partial Points.
- Print samples for 0 points (sample1∼sample4, 0pt/tc).
- For 15 points after (subtI1∼subtI15, 1pt/tc) :
- 1≤n≤1000.
- For 20 points after (subtII1∼subtII10, 2pts/tc) :
- 1≤n≤10000.
- For 45 points after (subtIII1∼subtIII15, 3pts/tc) :
- 10001≤n≤200000.
- For the last 20 points (subtmax1∼subtmax5, 4pts/tc) :
- n=200000.
- ∣Ai∣=102 (∣t∣ is the length of t).
- 100 points in total.