#include #include #include #include #include #include #include #include #include using namespace std; typedef long long LL; typedef double LD; typedef pair PLD; typedef pair PPLD; #define FOR(k,a,b) for(int k(a); k < (b); ++k) #define FORD(k,a,b) for(int k(b-1); k >= (a); --k) #define REP(k,a) for(int k=0; k < (a); ++k) #define ABS(a) ((a)>0?(a):-(a)) #define EPS 1e-9 #define P45 acos(0.0)/2 #define P90 acos(0.0) LD cross(PLD a, PLD b) { return a.first * b.second - a.second * b.first; } LD area2(PLD a, PLD b, PLD c) { return cross(a, b) + cross(b, c) + cross(c, a); } struct CIRCLE { LD x, y, R; CIRCLE() {} CIRCLE(LD _x, LD _y, LD _R) : x(_x), y(_y), R(_R) {} void Read() { double _x, _y; scanf("%lf %lf", &_x, &_y); x = _x, y = _y, R = -1; } PPLD InterSection(const CIRCLE& other) { LD lx = x, ly = y, lR = R, ox = other.x, oy = other.y, oR = other.R; LD d = (lx - ox)*(lx - ox) + (ly - oy)*(ly - oy); d = sqrt(d); if (ABS(lR + oR - d) < EPS) return PPLD(PLD((x + other.x) / 2, (y + other.y) / 2), PLD(x, y)); if (d < lR + oR) { LD a = (lR * lR - oR*oR + d*d) / (2.0*d); LD h = sqrt(lR*lR - a*a); PLD tp1(lx + a*(ox - lx) / d, ly + a*(oy - ly) / d); PLD p1(tp1.first + h*(oy - ly) / d, tp1.second - h*(ox - lx) / d); PLD p2(tp1.first - h*(oy - ly) / d, tp1.second + h*(ox - lx) / d); return PPLD(p1, p2); } return PPLD(PLD(x, y), PLD(x, y)); } bool IsIn(const PLD& p) const { return ABS((p.first - x)*(p.first - x) + (p.second - y)*(p.second - y)) < R * R + EPS; } }; int main(int argc, char** argv) { #ifdef HOME freopen("in.txt", "rb", stdin); freopen("out.txt", "wb", stdout); #endif int N, M; scanf("%d %d", &N, &M); vector v(N); REP(i, N) v[i].Read(); LD lo = 0, hi = 2000; while (ABS(hi - lo) > 0.001) { LD actR = (hi + lo) / 2; REP(i, N) v[i].R = actR; int mx = 0; REP(i, N) FOR(j,i+1,N) { PPLD ip = v[i].InterSection(v[j]); CIRCLE c1,c2; c1.x = ip.first.first, c1.y = ip.first.second, c1.R = actR; int db1 = 0, db2 = 0; REP(k, N) { if (c1.IsIn(make_pair(v[k].x, v[k].y))) ++db1; } c2.x = ip.second.first, c2.y = ip.second.second, c2.R = actR; REP(k, N) { if (c2.IsIn(make_pair(v[k].x, v[k].y))) ++db2; } mx = max(max(db1, db2),mx); } if (mx >= M) hi = actR; else lo = actR; } printf("%.3lf\n", lo); return 0; }