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
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?

Priyanshu Srivastava: 2013-08-08 13:57:05

Standard Sorting(C++) - 2.39 s
Merge Sort - 3.11 s
Heap Sort - 3.10 s
Count Sort - 2.33 s

Ouditchya Sinha: 2013-04-29 06:47:25

Merge Sort with Fast I/O : 2.03s
Counting Sort with Even Faster I/O : 0.42s
How is 0.28s possible? Anyone, any ideas?

Stupider: 2013-01-29 16:09:36

the numbers are low
why not counting sort

Last edit: 2013-01-29 16:09:53
Unnati Gupta: 2013-01-23 16:01:21

TLE in Python 2.7

: 2013-01-12 08:27:26

quick sort is faster than merge sort.. :)

Lai Manh Tuan: 2013-01-10 06:59:21

Time limit is too strict

[EDIT]
Got AC.
Use faster input/output method.

Last edit: 2013-01-10 07:02:09
Onur: 2013-01-09 20:37:38

why i couldnt get AC with lineer sort?

________________________________________

Read&Print with C operations

Last edit: 2013-01-10 14:47:45

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