Micro has made a breakthrough. He made a function which he proudly calls Micro's Array Fucntion. It takes an array of integers A and an integer K as input and optimally finds out the number of unordered pairs such that .
Micro is getting a lot of recognition because of it. His best friend Mike wants to be a part of it, but for that he needs to make some contribution. He thought of extending Micro's Array function. He wants to make a new function that also takes an array of integers A and an integer K as input and optimally calculates for all contiguous subarrays X of A. He need your help in this and help here means do the entire task. He'll give you an integer K and an array A having N integers and you need to compute .
Input:
First line consists of a single integers T denoting the number of test cases.
First line of each test case consists of two space separated integer denoting N and K.
Second line of each test case consists of a N space separated integers denoting the array A.
Output:
For each test case, print the value of in a new line.
Constraints:
,
,
,
,
,
,