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