Submit solution

Points:
3

Time limit:
5.0s

Memory limit:
6M

PyPy 2
10M

PyPy 3
12M

Python 2
10M

Python 3
12M

Author:

Problem type

How to sort.

#### Input Specification

On the first line, an integer . On the following lines, there will be a sequence of numbers, with each number between and .

#### Output Specification

Using a line break as a separator between numbers, print out the sequence from the input, in sorted order.

## Comments

imagine if someone actually passed with bogosort...

For those who spend lots of effort on this problem but still cannot pass, this page might give you an idea about the nature of this problem.

Even if you implement the intended solution, you will get an MLE if you use Python.

edit: you can AC on Python now.

what a miracle... this is truly a miracle-based sorting algorithm

what is the miracle?

the sort

What sorting algorithm am I supposed to use with only 6MB of RAM?

the miracle one

all of them.

At the same time

This comment is hidden due to too much negative feedback. Show it anyway.

Try this and tell me what you get

Aren't the numbers separated by a line break?

The numbers make 1 sequence out of 4 total sequences.

This problem is cheese.

My problem is "java.lang.OutOfMemoryError" and I can't figure out what's causing it; does line breaking have anything to do with this? (I have no clue what a line break is.)

most likely you are storing numbers in an array, with 1000,000 numbers, that requires about 1000,000 * 8 bytes, or about 8 megabytes, which is over the memory limit for this problem

This comment is hidden due to too much negative feedback. Show it anyway.

BeepBeep! I'm a bot. Your comment seems sad to us, cheer up! Have a kitten P.S. This bot is powered by A.I. sentiment analysis