3526 - Unordered List 3526 - Lista desordenada I 3526 - Unordered List

Statistics Sub: 341 | AC: 147 | AC%: 43,11 | Score: 1,16
Created by Guillermo González Jiménez
Added by WIL (2016-02-15)
Limits
Total Time: 5000 MS | Test Time: 1000 MS |Memory: 512 MB | Output: 64 MB | Size: 9 KB
Enabled languages
Available in

Description

In math class, the professor give to Javier a large list of unordered numbers. After that, the boy has said to his teacher, how many numbers situated after the i-th number are also greater than it. As the list of numbers are very large, the boy programmed the task, but his solution was too slow and can't solve the list given by his teacher because have more than one thousand numbers. Can you help Javier with this problem?
Durante la clase de matemáticas el profesor le dio a Javier una larga lista de números desordenados. A partir de esto, El joven debía decir a su profesor cuantos números por delante de la i-ésima posición eran mayores que la misma. Como la lista de números era muy grande, el muchacho recurrió a la computación para resolver esta tarea, así que se las ingenió para crear un programa que resolvía este problema, pero el programa tenía un defecto y era que para más de mil números demoraba demasiado tiempo y por tanto no resolvía la tarea del profesor.
¿Crees poder ayudar a Javier con este problema;jsessionid=1334B7BB51C6660915CEADFFB0BE2C52?
In math class, the professor give to Javier a large list of unordered numbers. After that, the boy has said to his teacher, how many numbers situated after the i-th number are also greater than it. As the list of numbers are very large, the boy programmed the task, but his solution was too slow and can't solve the list given by his teacher because have more than one thousand numbers. Can you help Javier with this problem?

Input specification

Line 1: an integer value N (1 <= N <= 10^5)
Line 2: N integer numbers Ki (1 <= Ki <= 10^5) separates by space.
Línea 1: un valor entero N (1 <= N <= 10^5)
Línea 2: N número enteros Ki (1 <= Ki <= 10^5) separados por N-1 espacios.
Line 1: an integer value N (1 <= N <= 10^5)
Line 2: N integer numbers Ki (1 <= Ki <= 10^5) separates by space.

Output specification

Print N integer values separates by space, where each of them represents the amount of numbers situated after the i-th number such that they are greater than i-th number too.
Imprimir N valores enteros separados por espacios, donde cada i-valor represente la cantidad de valores por delante de esta posición que son mayores que la misma.;jsessionid=1334B7BB51C6660915CEADFFB0BE2C52
Line 1: an integer value N (1 <= N <= 10^5)
Line 2: N integer numbers Ki (1 <= Ki <= 10^5) separates by space.

Sample input

10
2 8 4 1 10 4 1 9 10 3

Sample output

7 3 3 5 0 2 3 1 0 0

Hint(s)

http://coj.uci.cu/24h/
http://coj.uci.cu/24h/
http://coj.uci.cu/24h/

Recommendation

We have carefully selected several similar problems: 3379 | 3954 | 2378 | 2756 | 3419 | 3734