401573: GYM100495 E Simple sequence
Description
You are given an array (s) of positive integers having the length n.
Let's define the subarray as the array between some indexes l and r (l ≤ r and elements are sl, sl + 1, ..., sr). We call the subarray "simple" if mn is the minimal element in this subarray, mx is the maximal element in this subarray, a is a given parameter and inequality is satisfied.
You need to find the size of the biggest possible simple subarray.
InputThe first line contains the number of test cases T (1 ≤ T ≤ 50).
In the first line of every test case there are two integers n (1 ≤ n ≤ 105) and a (1 ≤ a ≤ 109) - the size of the array and the described parameter.
In the second line of every test case there are n integers si (1 ≤ si ≤ 109) - the elements of the array.
OutputFor each test case output one line containing “Case #tc: size” where tc is the number of the test case (starting from 1) and size is the size of the biggest possible simple subarray.
ExamplesInput2Output
2 1
1 2
2 1
1 3
Case #1: 2
Case #2: 1