Problem

3 /8


Merge sort

Theory Click to read/hide

Error

Problem

Sort this array using merge sort.


Input
The first line of the input contains the number of elements in the array NN <= 105. Next comes N integers not exceeding 109 in absolute value.


Imprint
Print these numbers in non-decreasing order.
 
Examples
# Input Output
1 2
3 1
1 3