TSORT - Turbo Sort

Given the list of numbers, you are to sort them in non decreasing order.

Input

t – the number of numbers in list, then t lines follow [t <= 10^6].
Each line contains one integer: N [0 <= N <= 10^6]

Output

Output given numbers in non decreasing order.

Example

Input:

5
5
3
6
7
1

Output:

1
3
5
6
7

Added by:Roman Sol
Date:2005-03-14
Time limit:2.700s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: ERL JS-RHINO NODEJS PERL6 VB.NET
Resource:ZCon

hide comments
2014-03-12 14:43:04 Jugal kishor sahu
why i am geting wrong answer.i am using tree inorder traversal.
2014-03-02 06:15:49 harrypotter192
nice one :)
no sorting algorithm required :P
2014-02-09 09:43:48 TCony
Time limit is a little too strict. my own qsort got TLE, but STL's sort ACed. STL's implementation in MinGW is IntroSort. TimSort is the implementatin of Python 2.3+.
2014-01-17 06:50:47 leafmoon
I used
cin.tie(0);
ios::sync_with_stdio(false);
and cout<<"\n"
I got AC (2.3s)

Last edit: 2014-01-17 06:51:12
2014-01-12 11:42:07 DanieV
C++ users dont use cin,cout!!You will get TLE.Quicksort,Heapsort,Mergesort will work fine
2014-01-12 11:35:59 DanieV
WTF QUICK SORT GETS TL!
2014-01-03 12:30:02 Ankit Jain
lol....happy stl sort everyone !!!
2013-12-17 14:30:26 Saimadhav Heblikar
how is .28 possible?
2013-10-19 13:46:29 alaa hantash
what is the STL sort !!
2013-09-04 15:02:09 $iddharth prasad
Insertion sort gives TLE why?
© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.