Subarrays With Distinct Elements. We count sum of lengths in this subarray using above formula. Example