401573: GYM100495 E Simple sequence

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

E. Simple sequencetime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

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.

Input

The 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.

Output

For 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.

ExamplesInput
2
2 1
1 2
2 1
1 3
Output
Case #1: 2
Case #2: 1

加入题单

算法标签: