Queue
链接
Description
There are n walruses standing in a queue in an airport. They are numbered starting from the queue’s tail: the 1-st walrus stands at the end of the queue and the n-th walrus stands at the beginning of the queue. The i-th walrus has the age equal to ai.
The i-th walrus becomes displeased if there’s a younger walrus standing in front of him, that is, if exists such j ( i < j ) j (i < j) j(i < j), that a i > a j a_i > a_j ai > aj. The displeasure of the i i i-th walrus is equal to the number of walruses between him and the furthest walrus ahead of him, which is younger than the i-th one. That is, the further that young walrus stands from him, the stronger the displeasure is.
The airport manager asked you to count for each of n walruses in the queue his displeasure.
Input
The first line contains an integer n ( 2 ≤ n ≤ 1 0 5 ) n (2 ≤ n ≤ 10^5) n(2 ≤ n ≤ 10