There is a big staircase with $N$ steps (numbered $1$ through $N$) in ChefLand. Let's denote the height of the top of step $i$ by $h_i$. Chef Ada is currently under the staircase at height $0$ and she wants to reach the top of the staircase (the top of the last step). However, she can only jump from height $h_i$ to the top of a step at height $h_f$ if $h_f-h_i \le K$. To help Ada, we are going to construct some intermediate steps; each of them may be constructed between any two steps, or before the first step, and have any height. What is the minimum number of steps that need to be added to the staircase so that Ada could reach the top?

-----Input-----
- The first line of the input contains a single integer $T$ denoting the number of test cases. The description of $T$ test cases follows.
- The first line of each test case contains two space-separated integers $N$ and $K$.
- The second line contains $N$ space-seperated integers $h_1, h_2, \dots, h_N$.

-----Output-----
For each test case, print a single line containing one integer — the minimum required number of steps.

-----Constraints-----
- $1 \le T \le 64$
- $1 \le N \le 128$
- $1 \le K \le 1,024$
- $1 \le h_i \le 1,024$ for each valid $i$
- $h_i < h_{i+1}$ for each valid $i$

-----Example Input-----
1
4 3
2 4 8 16

-----Example Output-----
3

Starter code:

Solutions:
# cook your dish here

import numpy as np
 

def minstairs(n,k):
 stairsHeight=[]
 stairs=0
 current = 0
 stairsHeight=list(map(int, input().split()))
 stairsHeight=np.array(stairsHeight)
 curr=0
 for i in range(n):
  if stairsHeight[i]-curr<=k:
   curr=stairsHeight[i]
  else:
   if (stairsHeight[i]-curr)%k==0:
    stairs+=((stairsHeight[i]-curr)//k)-1
   else:
    stairs+=(stairsHeight[i]-curr)//k
   curr=stairsHeight[i]
 return stairs
  
T=int(input())
for i in range(T):
 n,k =list(map(int,input().split()))
 print(minstairs(n,k))


# cook your dish here
from numba import njit
import numpy as np
 

def minstairs(n,k):
 stairsHeight=[]
 stairs=0
 current = 0
 stairsHeight=list(map(int, input().split()))
 stairsHeight=np.array(stairsHeight)
 curr=0
 for i in range(n):
  if stairsHeight[i]-curr<=k:
   curr=stairsHeight[i]
  else:
   if (stairsHeight[i]-curr)%k==0:
    stairs+=((stairsHeight[i]-curr)//k)-1
   else:
    stairs+=(stairsHeight[i]-curr)//k
   curr=stairsHeight[i]
 return stairs
  
T=int(input())
for i in range(T):
 n,k =list(map(int,input().split()))
 print(minstairs(n,k))


# cook your dish here
t=int(input())
for i in range(t):
 current=0
 count=0
 n,k=[int(x) for x in input().split()]
 h=[int(y) for y in input().split()]
 for j in range(100000000):
  # print(current)
  if current==h[-1]:
   break
  
  for aa in range(100000000):
   
   if abs(current-h[j])<=k:
    current=h[j]
    break
   else:
   # for 
    current+=k
    # print(current)
    count+=1
 print(count)
 
 
 
 
 # for j in range(10000000):
 #     print(current)
 #     if current+abs(hi[j]-hi[j+1])<=k:
 #         current=hi[j]
 #         if current==hi[-1]:
 #             break
   
 #     else:
 #         current+=k
 #         count+=1
 # # print(count)


# cook your dish herr
for i in range(int(input())):
 N,K=map(int,input().split())
 H=[]
 H=[int(x) for x in input().split()]
 highest=0
 count=0
 for k in H:
  if(k-highest>K):
   count=count+(k-highest-1)//K
  highest=k
 print(count)

# cook your dish here
for _ in range(int(input())):
 n,k = list(map(int,input().split()))
 arr = list(map(int,input().split()))
 res = (arr[0]-1)//k
 for i in range(1,len(arr)):
  res+= (arr[i]-arr[i-1]-1)//k 
 print(res)

# cook your dish here
for _ in range(int(input())):
 N,K=(int(i) for i in input().strip().split())
 stair_arr=[0]
 stair_arr.extend([int(i) for i in input().strip().split()])
 add_cnt=0
 for i in range(1,N+1):
  height_diff=stair_arr[i]-stair_arr[i-1]
  if(height_diff>K):
   add_cnt+=(height_diff//K)
   if(height_diff%K==0):
    add_cnt-=1
 
 print(add_cnt)


for i in range(int(input())):
 n,k=map(int,input().split())
 a=list(map(int,input().split()))
 c=0
 if((a[0]-1)>k):
  c+=((a[0]-1)//k)
 for i in range(n-1):
  if((a[i+1]-a[i])>k):
   c+=(a[i+1]-a[i]-1)//k
 print(c)

# cook your dish here
for i in range(int(input())):
 n,k=map(int,input().split())
 a=list(map(int,input().split()))
 c=0
 if((a[0]-1)>k):
  c+=((a[0]-1)//k)
 for i in range(n-1):
  if((a[i+1]-a[i])>k):
   c+=(a[i+1]-a[i]-1)//k
 print(c)

# cook your dish here
for _ in range(int(input())):
 M, L = map(int, input().split())
 g = list(map(int, input().split()))
 g.insert(0,0)
 b = 0
 for i in range(1, M+1):
  b += (g[i] - g[i-1] - 1) // L
 print(b)

# cook your dish here
for _ in range(int(input())):
 N, K = map(int, input().split())
 h = list(map(int, input().split()))
 h.insert(0,0)
 c = 0
 for i in range(1, N+1):
  c += (h[i] - h[i-1] - 1) // K
 print(c)

# cook your dish here
for _ in range(int(input())):
 N, K = list(map(int, input().split()))
 h = list(map(int, input().split()))
 h.insert(0,0)
 c = 0
 for i in range(1, N+1):
  c += (h[i] - h[i-1] - 1) // K
 print(c)


# cook your dish here
for _ in range(int(input())):
 N, K = map(int, input().split())
 h = list(map(int, input().split()))
 h.insert(0,0)
 c = 0
 for i in range(1, N+1):
  c += (h[i] - h[i-1] - 1) // K
 print(c)

for _ in range(int(input())):
 Ans=0
 N,K=map(int,input().split())
 H=list(map(int,input().split()))
 for i in range(N):
  if i==0 and K<H[i]:
   Ans=Ans+(H[i]-1)//K
  elif K<H[i]-H[i-1] and i>0:
   Ans=Ans+(H[i]-H[i-1]-1)//K
 print(Ans)

# cook your dish here
for _ in range(int(input())):
 n,k=list(map(int,input().split()))
 a=list(map(int,input().split()))
 c=0
 s=0
 for i in range(n):
  s+=(a[i]-c-1)//k
  c=a[i]
 print(s)

for i in range(int(input())):
 a,b=list(map(int,input().split()))
 y=list(map(int,input().split()))
 s=0
 if y[0]>b:
  s+=y[0]//b
  if y[0]%b==0:
   s-=1
 for j in range(1,a):
  diff=y[j]-y[j-1]
  s+=(diff//b)
  if diff%b==0:
   s-=1
 print(s)

for _ in range(int(input())):
 N, K = map(int, input().split())
 h = list(map(int, input().split()))
 h.insert(0,0)
 c = 0
 for i in range(1, N+1):
  c += (h[i] - h[i-1] - 1) // K
 print(c)

for _ in range(int(input())):
 n,k=list(map(int,input().split()))
 a=list(map(int,input().split()))
 c=0
 s=0
 for i in range(n):
  s+=(a[i]-c-1)//k
  c=a[i]
 print(s)

for _ in range(int(input())) :
 n, k= map(int, input().split())
 a = list(map(int, input().split()))
 sum = 0
 c = 0
 for i in range(n) :
  sum += (a[i] - c - 1) // k
  c = a[i]
 print(sum)

t = int(input())
for _ in range(t):
 n,k = map(int,input().split())
 a = list(map(int,input().split()))
 c =0
 s = 0
 for i in range(n):
  if s+k < a[i]:
   while s+k < a[i]:
    s += k
    c += 1
  s = a[i]
 print(c)

for i in range(int(input())):
 n,k=list(map(int,input().split()))
 arr=list(map(int,input().split()))
 a=0
 c=[]
 b=[]
 for i in range(n):
  m=arr[i]-a
  if(k>=m):
   pass
  else:
   

   if m%k==0:
    c.append(int(m/k)-1)

   else:
    b.append(int(m/k))
  
  a=arr[i]
 print(sum(c)+sum(b))






# cook your dish here
t=int(input())
for i in range(t):
 n,k=map(int,input().split())
 s=list(map(int,input().split()))
 curr=0
 count=0
 for i in range(n):
  count += (s[i]-curr-1)//k
  curr=s[i]
 print(count)

from sys import stdin, stdout
ans = []
for _ in range(int(stdin.readline())):
 n, k = map(int, stdin.readline().split())
 s_h = list(map(int, stdin.readline().split()))
 num = (s_h[0] - 1) // k
 for i in range(1, n):
  num += (s_h[i] - s_h[i-1] - 1) // k
 ans.append(str(num))
stdout.write('\n'.join(ans))

# cook your dish here
t=int(input())
for i in range(t):
 n,k=map(int,input().split())
 s=list(map(int,input().split()))
 curr=0
 count=0
 for i in range(n):
  count += (s[i]-curr-1)//k
  curr=s[i]
 print(count)

t=int(input())
for i in range(t):
 n,k=list(map(int,input().split(" ")))
 arr=list(map(int,input().split(" ")))
 arr.insert(0,0)
 count=0
 p=0
 q=0
 for i in range(len(arr)-1):
  if arr[i+1]-arr[i]<=k:
   pass
  elif arr[i+1]-arr[i]>k:
   p=arr[i+1]
   q=arr[i]
   while p-q>k:
    q=q+k
    count+=1
 print(count)