TSORT - Turbo Sort

no tags 

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

hide comments
Jugal kishor sahu: 2014-03-12 14:43:04

why i am geting wrong answer.i am using tree inorder traversal.

harrypotter192: 2014-03-02 06:15:49

nice one :)
no sorting algorithm required :P

TCony: 2014-02-09 09:43:48

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+.

leafmoon: 2014-01-17 06:50:47

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
DanieV: 2014-01-12 11:42:07

C++ users dont use cin,cout!!You will get TLE.Quicksort,Heapsort,Mergesort will work fine

DanieV: 2014-01-12 11:35:59

WTF QUICK SORT GETS TL!

Ankit Jain: 2014-01-03 12:30:02

lol....happy stl sort everyone !!!

Saimadhav Heblikar: 2013-12-17 14:30:26

how is .28 possible?

alaa hantash: 2013-10-19 13:46:29

what is the STL sort !!

$iddharth prasad: 2013-09-04 15:02:09

Insertion sort gives TLE why?


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