mod = 10**9 + 7
stone= [0] * 10000000
def check(jump,n,k , stone):
    i=ans=0
    j=0
    j1=0
    flag=0
    for i in range(n):
               
        while(j<n and stone[j]-stone[j1]<=jump):
            j+=1
        ans+=1
        j1=j-1;
        if(j==n):
           flag=1
           break
    if(ans<=k and flag==1):
       return 1
    return 0


test = int(raw_input())
for i in range(test):
	n , k = [int(x) for x in raw_input().split()]
	arr = [int(x) for x in raw_input().split()]
	for i in range(n):
		stone[i] = arr[i]
	l , h = 1 , 10**9
	while l <= h:
		mid = (l + h) // 2
		if check(mid , n , k , stone):
		
			h = mid - 1
		else:
			l = mid + 1
	print int(h) + 1