WEBSITE RETURNED, HOWEVER SUBMIT QUANTITY IS RESTRICTED PER DAY TO VERY LITTLE (UNDER JUDGE0 NEW POLICY, API PROVIDER). Therefore it is very much for you to pay attention TEST CAREFULLY CODE BEFORE SUBMIT.

Sort array

Threads: For an array of n integers. Printed on 2 line arrays respectively arranged vertically rising and descending.
Input: The first line is an integer n. The second line 2 n is an integer array, of numbers separated by spaces.
Output: two lines, line array is arranged on the increase, bottom line array is sorted by dimensional reduction. The numbers on the same line separated by spaces.
For example:

input:
3
4 -3 -2
output:
-3 -2 4
4 -2 -3

You are not logged in? Log in to Submit Now!

4 Comments

Add a Comment