write a go solution for Description: You are given an array a consisting of n integers and an integer k. A pair (l,r) is good if there exists a sequence of indices i_1,i_2,...,i_m such that - i_1=l and i_m=r; - i_j<i_j+1 for all 1<=qj<m; and - |a_i_j-a_i_j+1|<=qk for all 1<=j<m. Find the number of pairs (l,r) (1<=l<=r<=n) that are good. Input Format: Each test contains multiple test cases. The first line contains a single integer t (1<=t<=10^5) — the number of test cases. The description of the test cases follows. The first line of each test case contains two space-separated integers n and k (1<=n<=5*10^5; 0<=k<=10^5) — the length of the array a and the integer k. The second line of each test case contains n space-separated integers a_1,a_2,ldots,a_n (1<=qa_i<=q10^5) — representing the array a. It is guaranteed that the sum of n over all test cases does not exceed 5*10^5. Output Format: For each test case, print the number of good pairs. Note: In the first test case, good pairs are (1,1), (1,2), (1,3), (2,2), (2,3), and (3,3). In the second test case, good pairs are (1,1), (1,3), (1,4), (2,2), (2,3), (2,4), (3,3), (3,4) and (4,4). Pair (1,4) is good because there exists a sequence of indices 1,3,4 which satisfy the given conditions.. Output only the code with no comments, explanation, or additional text.