#228. 右边小于当前元素的数的个数
右边小于当前元素的数的个数
Description
给定一个整数数组 nums,按要求返回一个新数组 counts。
数组 counts 有该性质: counts[i] 的值是 nums[i] 右侧小于 nums[i] 的元素的数量。
Format
Input
第1行:1个整数n,表示数组元素个数
第2行:n个整数,表示数组nums
Output
第1行:n个整数,表示counts数组的各个元素
Samples
5
-6 6 -8 2 -3
1 3 0 1 0
Limitation
相关
在以下作业中: