Time Limit: 2 sec / Memory Limit: 1024 MB
Score : 300300 points
Problem Statement
There are NN candies arranged in a row from left to right.
Each of these candies has one color that is one of the 10^9109 colors called Color 11, Color 22, \ldots…, and Color 10^9109.
For each i = 1, 2, \ldots, Ni=1,2,…,N, the color of the ii-th candy from the left is Color c_ici.
From this row, Takahashi can choose KK consecutive candies and get them.
That is, he can choose an integer ii such that 1 \leq i \leq N-K+11≤i≤N−K+1 and get the ii-th, (i+1)(i+1)-th, (i+2)(i+2)-th, \ldots…, (i+K-1)(i+K−1)-th candy from the left.
Takahashi likes to eat colorful candies, so the more variety of colors his candies have, the happier he will be.
Print the maximum possible number of distinct colors in candies he gets.
Constraints
-
1 \leq K \leq N \leq 3 \times 10^51≤K≤N≤3×105
-
1 \leq c_i \leq 10^91≤ci≤109
-
All values in input are integers.
Input
Input is given from Standard Input in the following format:
NNKKc_1c1c_2c2\ldots…c_NcN
Output
Print the maximum possible number of distinct colors in candies Takahashi gets.