You are given a nums.
The distinct count of a subarray of nums is defined as the number of unique elements present in that subarray.
Return the sum of the squares of distinct counts across all subarrays of nums.
Since the answer may be very large, return it modulo
Constraints:
nums.length
nums[i]
You are given a nums.
The distinct count of a subarray of nums is defined as the number of unique elements present in that subarray.
Return the sum of the squares of distinct counts across all subarrays of nums.
Since the answer may be very large, return it modulo
Constraints:
nums.length
nums[i]