#include <iostream>
using namespace std;
int bin_s(int a[], int n, int k){
int l=0,r=1e9;
while(l+1<r){
int m=(l+r)/2;
int h=1;
int pos=0;
for(int i=1; i<n; i++)
if(a[i]-a[pos]>=m){
h++;
pos=i;
}
if(h>=k)
l=m;
else r=m;
}
return l;
}
int main() {
int n,k;
cin>>n>>k;
int a[n];
for (int i=0; i<n; i++)
cin>>a[i];
cout<<bin_s(a, n,k);
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwppbnQgYmluX3MoaW50IGFbXSwgaW50IG4sIGludCBrKXsKCWludCBsPTAscj0xZTk7Cgl3aGlsZShsKzE8cil7CgkJaW50IG09KGwrcikvMjsKCQlpbnQgaD0xOwoJaW50IHBvcz0wOwoJZm9yKGludCBpPTE7IGk8bjsgaSsrKQoJCWlmKGFbaV0tYVtwb3NdPj1tKXsKCQkJaCsrOwoJCQlwb3M9aTsKCQl9CglpZihoPj1rKQoJCWw9bTsKCWVsc2Ugcj1tOwoJfQoJcmV0dXJuIGw7Cn0KCmludCBtYWluKCkgewoJaW50IG4sazsKCWNpbj4+bj4+azsKCWludCBhW25dOwoJZm9yIChpbnQgaT0wOyBpPG47IGkrKykKCQljaW4+PmFbaV07Cgljb3V0PDxiaW5fcyhhLCBuLGspOwogICAgcmV0dXJuIDA7Cn0K