Maximums to the right#8964

Maximums to the right

1 segundo
128 megabytes
Muy fácil

Given array of integers. Move all maximum elements to the end of the array without changing the order of others.

Entrada

First line contains positive integer . Next line contains integers. All numbers do not exceed by absolute value.

Salida

Print the elements of updated array.

Ejemplos

Ejemplo 1

Loading
Loading