Call an array of integers diverse if it has length at least 1 and it has at least distinct integers.
Given an array of integers and a parameter , compute the number of subarrays that are diverse.
The first line contains two positive integers, and .
Each of the next lines contains a positive integer, . These integers in order comprise the array.
Output the number of subarrays that are diverse.
4 2 1 2 2 2