You are given an array A. The array contains all the elements in the range of 1 to K.
Determine the minimum size of the subarray that contains all the K distinct elements.
Input format
Output format
Print the minimum size of the subarray that contains all the K distinct elements.
Constraints
1≤T≤101≤N≤1000001≤K≤10000
There's a continuous segment 2,3,1 which contains all the K distinct elements.