1 #include "bits/stdc++.h"
2 using namespace std;
3 typedef long long LL;
4 const int MAX=1005;
5 int n,K;
6 int x[MAX],y[MAX],fa[MAX];
7 inline int read(){
8 int an=0,x=1;char c=getchar();
9 while (c<‘0‘ || c>‘9‘) {if (c==‘-‘) x=-1;c=getchar();}
10 while (c>=‘0‘ && c<=‘9‘) {an=(an<<3)+(an<<1)+c-‘0‘;c=getchar();}
11 return an*x;
12 }
13 double dis(int i,int j){return sqrt((x[i]*1.0-x[j]*1.0)*(x[i]*1.0-x[j]*1.0)+(y[i]*1.0-y[j]*1.0)*(y[i]*1.0-y[j]*1.0));}
14 inline int getfather(int x){return fa[x]==x?x:fa[x]=getfather(fa[x]);}
15 bool feasible(double x){
16 int i,j,ans=0;
17 for (i=1;i<=n;i++) fa[i]=i;
18 for (i=1;i<=n;i++)
19 for (j=1;j<=n;j++)
20 if (i!=j && dis(i,j)<=x){
21 int tx=getfather(i),ty=getfather(j);
22 if (tx!=ty) fa[tx]=ty;
23 }
24 for (i=1;i<=n;i++)
25 if (fa[getfather(i)]==i) ans++;
26 return ans<K;
27 }
28 int main(){
29 freopen ("group.in","r",stdin);freopen ("group.out","w",stdout);
30 int i,j;
31 n=read(),K=read();
32 for (i=1;i<=n;i++) x[i]=read(),y[i]=read();
33 double low=0,high=1e10,mid;
34 while (high-low>0.0000001){
35 mid=(low+high)/2.0;
36 if (feasible(mid)) high=mid;
37 else low=mid;
38 }
39 printf("%.2lf",low);
40 return 0;
41 }