#include <iostream>
#include <algorithm>

using namespace std;

const int N = 1e5 + 1;
const double EPS = 1e-8;
int n, k;
double x[N];

// Returns true if we can choose k points out of the given points such that
// they have minimum distance at least d, or false otherwise.
// Assumes x is sorted in increasing order.
bool check(double d) {
    int count = 1; // number of points we've chosen so far.
                   // Always choose the first point.
    double prev = x[0]; // The location of the last point we chose.
    // Choose the remaining points greedily: in other words, choose the
    // furthest-left point that's far enough away from the other points.
    for (int i = 1; i < n; i++) {
        if (x[i] - prev >= d) {
            // We can choose this point!
            count++;
            prev = x[i];
        }
    }
    if (count >= k) {
        return true; // Enough points!
    } else {
        return false; // Not enough points -- it's not possible.
    }
}

int main() {
    // input
    cin >> n >> k;
    for (int i = 0; i < n; i++) {
        cin >> x[i];
    }
    
    sort(x, x + n);
    // Run binary search to find the answer.
    // The answer is definitely at least 0, and definitely at most the largest
    // distance between all the points, so use these as our initial l and r.
    double l = 0, r = x[n-1] - x[0];
    while (r - l > EPS) {
        double mid = (l + r) / 2; // Guess a value for d.
        if (check(mid)) {
            // mid is possible!
            // See if we can make a bigger choice of d.
            l = mid;
        } else {
            // mid isn't possible!
            // We need to choose a smaller d.
            r = mid;
        }
    }
    cout << l << endl;
    return 0;
}
