Problem Statement for mc1p4

**Mock CCC Contest 1 Problem 4 - Cold Compress** On the recent test from Mr. Segev, Jing failed to identify the "near miss" between Mr. Segev and "King of the Universe." As a result, he is now below the class average. Out of spite, he hacks into Mr. Segev's Markbook account and decides to compress the class average in a certain way. Instead of using a standard arithmetic mean, he decides to implement a compressed average in which he chooses a number `L` and averages the minimum value of all subarrays of length `L`. You are given an array `a` of the marks of the `N` students in Jing's class. Jing doesn't want to seem too suspicious so find the maximum `L` he can choose such that the compressed average is no less than `K`. **Input Specification:** First line: Two integers: `N` (number of students), `K` (the minimum compressed average). Second line: `N` space-separated integers describing the marks of the students (the array `a`). **Output Specification:** The maximum `L` Jing can choose such that the compressed average is no less than `K`. **Subtasks:** For all test cases, `1 ≤ a[i] ≤ 10000` For 15% of the marks, `1 ≤ N ≤ 100` For an additional 30%, `1 ≤ N ≤ 2000` For full marks, `1 ≤ N ≤ 100000` **Sample input:** ``` 5 4 6 4 9 20 1 ``` **Output for sample input:** ``` 2 ``` **Explanation for sample case:** The compressed average for `L=2` is `4 + 4 + 9 + 1 = 4.5` which can be proven to be the largest `L` that satisfies the requirements.


🕑 Time limit: 4.0 seconds
 java: 5.0 seconds
 python: 5.0 seconds
⚎ Memory limit: 256.0 MB