LearnPy Hub
← Arena
AdvancedRating 1900

Smaller Numbers to the Right

For each number, count how many numbers to its right are strictly smaller.

Input

n, then n integers.

Output

n integers.

Sample 1

Input
4
5 2 6 1
Output
2 1 1 0

Sample 2

Input
1
-1
Output
0
solution.py
Output appears here
Smaller Numbers to the Right · Python Arena problem · LearnPy Hub