Input: A[] = {9, 5, 3, 4, 1}, X = 4, K = 1.
Output: 3.
Explanation: Three Subarrays satisfy the conditions:
i = 0: the subarray [a0, a1] = [9, 5] and 1.9 < 4.5.
i = 1: the subarray [a1, a2] = [5, 3] and 1.5 < 4.3.
i = 2: the subarray [a2, a3] = [3, 2] and 1.3 < 4.4.
i = 3: the subarray [a3, a4] = [2, 1] but 1.4 = 4.1, so this subarray doesn't satisfy the condition.
Input: A[] = {22, 12, 16, 4, 3, 22, 12}, X = 2, K = 3.
Output: 1
Explanation: There are total 4 subarray out of which 1 satisfy the given condition.
i = 0: the subarray [a0, a1, a2, a3] = [22, 12, 16, 4] and 1.22 < 2.12 < 4.16 > 8.4, so this subarray doesn't satisfy the condition.
i = 1: the subarray [a1, a2, a3, a4]=[12, 16, 4, 3] and 1.12 < 2.16 > 4.4 < 8.3, so this subarray doesn't satisfy the condition.
i = 2: the subarray [a2, a3, a4, a5]=[16, 4, 3, 22] and 1.16 > 2.4 < 4.8 < 8.22, so this subarray doesn't satisfy the condition.
i = 3: the subarray [a3, a4, a5, a6]=[4, 3, 22, 12] and 1.4 < 2.3 < 4.22 < 8.12, so this subarray satisfies the condition.