stone= [0] * 10000000
def check(jump,n,k):
    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

if __name__ == "__main__":
    testcases = input()
    for caseNr in xrange(1, testcases+1):
       
        temp = map(int,raw_input().split())
        arr = map(int,raw_input().split())
        #stone[i]=arr[i]+stone[i]
        for i in range(temp[0]):
            stone[i]=arr[i]
        low=0
        high=1e9
        mid=0
        while(low<high):
            mid=(low+high)//2
            if(check(mid,temp[0],temp[1])):
                high=mid                
            else:
                low=mid+1
        print int(high)