'''
# Read input from stdin and provide input before running code

name = raw_input('What is your name?\n')
print 'Hi, %s.' % name
'''
def check_steps(steps,val):
	counter=0
	tmp=0
	n=len(steps)
	for i in range(n):
		if tmp+steps[i]<=val:
			tmp+=steps[i]
		else:
			counter+=1
			tmp=steps[i]
	return counter+1		
	
for i in range(int(raw_input().strip())):
	nx=map(int,raw_input().strip().split())
	n=nx[0];j=nx[1]
	path=map(int,raw_input().strip().split())
	
	
	steps=[]
	min=0
	for k in range(1,n):
		x=path[k]-path[k-1]
		steps.append(x)
		if x>min:
			min=x
	max=path[n-1]-path[0]
	
	if j==1:
		print max
		continue
	#CHECK FOR MIN POSSIBLE JUMP
	req=check_steps(steps,min)
	if req==j:
		print min
		continue
	
	while min<max:
		if max-min==1:
			if check_steps(steps,min)<=j:
				print min
			else:
				print max
			break
		now=(max+min)/2
		req=check_steps(steps,now)
		if req<=j:
			max=now
		else:
			min=now