A refrigerated warehouse logs an integer temperature reading every hour, for n hours. For a fixed window length k, consider every contiguous window of exactly k consecutive hours. A window is "compliant" if its MINIMUM temperature is between lo and hi inclusive.
Count how many windows are compliant.
Input format
Line 1: four integers n, k, lo, hi (with lo <= hi).
Line 2: n space-separated integers, the temperature readings.
Output format
A single integer: the number of compliant windows.
Constraints
- 1 <= k <= n <= 100000
- -1000000 <= lo <= hi <= 1000000
- -1000000 <= each reading <= 1000000