P2678 [NOIP2015 提高组] 跳石头 - 洛谷 | 计算机科学教育新生态 (luogu.com.cn)
d, n, m = map(int,input().split())
data = [0]
for i in range(n):
value = int(input())
data.append(value)
data.append(d)
def check(mid):
now = 0
cnt = 0
for i in range(1,n+2):
if abs(data[now]-data[i])<mid:
cnt += 1
else:
now = i
if cnt>m:
return False
else:
return True
l = 0
r = d
while l<r:
mid = (l + r + 1) // 2
if check(mid) :
l = mid
else:
r = mid-1
print(l)