#include #include #include #include #include using namespace std; #define INF 1000000000 const double eps = 1e-8; const double pi = acos(-1.0); int cmp(double x) { if (fabs(x) < eps) return 0; if (x > 0) return 1; return -1; } inline double sqr(double x){return x*x;} struct point { double x,y; point(){} point(double a,double b):x(a),y(b){} void input() { scanf("%lf%lf",&x,&y); } friend point operator + (const point &a, const point &b) { return point(a.x+b.x, a.y+b.y); } friend point operator - (const point &a, const point &b) { return point(a.x-b.x, a.y-b.y); } friend bool operator == (const point &a, const point &b) { return cmp(a.x-b.x)==0 && cmp(a.y-b.y)==0; } friend point operator * (const point &a, const double &b) { return point(a.x*b, a.y*b); } friend point operator * (const double &a, const point &b) { return point(a*b.x, a*b.y); } friend point operator / (const point &a, const double &b) { return point(a.x/b, a.y/b); } bool operator<(const point& a)const { if (cmp(x-a.x)!=0) return x con[110]; double dis[110][110]; int fa[110]; int get_fa(int x) { if (fa[x] == x) return x; fa[x] = get_fa(fa[x]); return fa[x]; } void merge(int x,int y) { x=get_fa(x);y=get_fa(y); fa[x] = y; } bool check(double d) { for (int i=0; ieps) { mid=(L+r)/2.0; if (check(mid)) L=mid; else r=mid; } if (cmp(L)>0) printf("%.2lf\n",L/2.0); else printf("impossible\n"); } return 0; }