{"raw_statement":[{"iden":"statement","content":"You are given an array (s) of positive integers having the length n.\n\nLet'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. \n\nYou need to find the size of the biggest possible simple subarray.\n\nThe first line contains the number of test cases T (1 ≤ T ≤ 50).\n\nIn 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. \n\nIn the second line of every test case there are n integers si (1 ≤ si ≤ 109) - the elements of the array.\n\nFor 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.\n\n"},{"iden":"input","content":"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."},{"iden":"output","content":"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."},{"iden":"examples","content":"Input22 11 22 11 3OutputCase #1: 2Case #2: 1"}],"translated_statement":null,"sample_group":[],"show_order":[],"formal_statement":"**Definitions**  \nLet $ T $ be the number of test cases, $ T \\leq 20 $.  \nFor each test case, let $ G = (V, E) $ be a binary tree with node set $ V $ and parent-child edges encoding left/right relationships. Each node $ v \\in V $ has an associated key $ k_v \\in \\mathbb{R} $.  \n\n**Constraints**  \n1. $ 1 \\leq T \\leq 20 $  \n2. $ G $ is a binary tree: each node has at most two children (left and right).  \n3. Node keys are comparable real numbers.  \n\n**Objective**  \nFind the maximum cardinality of a subset $ S \\subseteq V $ such that:  \n- The induced subgraph on $ S $ is connected (in the tree sense), and  \n- The subgraph formed by $ S $, with inherited left/right child relations and ancestor relationships, satisfies the binary search tree property:  \n  For every node $ v \\in S $, all keys in the left subtree of $ v $ (within $ S $) are $ < k_v $, and all keys in the right subtree of $ v $ (within $ S $) are $ > k_v $.  \n\nOutput: $ \\max |S| $ for each test case.","simple_statement":"Given a binary tree, find the largest subtree that is a binary search tree. Print the number of nodes in that subtree.","has_page_source":false}