Teeth
Limits: 2 sec., 256 MiB
Little Imp has N teeth. The i-th tooth has a sharp coeficient \(\mathbf{A_i}\).
Little Imp calls a tooth “cool” if its sharp coeficient is at least K. Your task is to find the maximal number of continuous “cool” teeth Little Imp has.
Input
The first line contains two integers N and K separated by a single space. The following line contains N integers \(\mathbf{A_1}, \mathbf{A_2}, \ldots, \mathbf{A_N}\) separated by single spaces.
Output
The maximal number of continuous “cool” teeth.
Constraints
\(1 \le \mathbf{N} \le 10^5\),
\(1 \le \mathbf{K} \le 10^9\),
\(1 \le \mathbf{A_i} \le 10^9\).
Samples
Input (stdin) | Output (stdout) |
---|---|
7 4 7 1 4 7 6 3 4 | 3 |
Source: Районна олімпіада 2014
Submit a solution
Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
---|
Element Type | Created | Who | Problem | Compiler | Result | Time (sec.) | Memory (MiB) | # | Actions |
---|