Alice are given an array $A[1..N]$ with $N$ numbers.
Now Alice want to build an array $B$ by a parameter $K$ as following rules:
Initially, the array B is empty. Consider each interval in array A. If the length of this interval is less than $K$, then ignore this interval. Otherwise, find the $K$-th largest number in this interval and add this number into array $B$.
In fact Alice doesn't care each element in the array B. She only wants to know the $M$-th largest element in the array $B$. Please help her to find this number.