#include #include #include using namespace std; #define prt(k) cout<<#k" = "< #include const int N = 333; const int M = 41; const int MAXN = 12111; int sqr(int x) { return x * x; } struct P { double x, y; int t; P() {} P(double _x, double _y) { x=_x, y=_y; } double dis(P b) { return sqrt((x-b.x)*(x-b.x)+(y-b.y)*(y-b.y)); } double operator * (P b) { return x*b.y - y*b.x; } P operator - (P b) { return P(x-b.x,y-b.y); } }p[454]; double dis(P a, P b) { return a.dis(b); } int n, m, kind; P a[334], b[545]; const double inf = 1e18; const double eps = 1e-8; double cross(P a, P b) { return a * b; } double cross(P a, P b, P c) { return (b - a) * (c - a); } int cmp(double x) { return x < -eps ? -1 : x > eps; } bool in(P p, P a, P b, P c) { double t = fabs(cross(p,a,b)) + fabs(cross(p,b,c)) + fabs(cross(p,a,c)); return cmp(t - fabs(cross(a,b,c))) == 0; } int side(P a, P b, P s, P t) { return cmp(cross(s,a,t) * cross(s,b,t)); } int mask[MAXN]; int id[M][M][M]; int getID(int i, int j, int k) { int a[3]; a[0] = i, a[1] = j, a[2] = k; sort(a, a+3); return id[a[0]][a[1]][a[2]]; } double w[M][M]; const int E = 1012000; int to[E], ne[E]; double cost[E]; int head[MAXN]; int tot; void initEdge() { tot = 0; memset(head, -1, sizeof head); } void addEdge(int u, int v, double w) { to[tot] = v, cost[tot] = w; ne[tot] = head[u]; head[u] = tot++; } double d[66][MAXN]; #include int cnt; bool inq[MAXN]; void spfa(double d[], int n) { queue q; for(int i=0;i d[u] + cost[i] + eps) { d[v] = d[u] + cost[i]; if(!inq[v]) { inq[v] = true; q.push(v); } } } } } double solve() { memset(inq, 0, sizeof inq); for(int S=0;S<(1<= 0) printf("Impossible\n"); else printf("%.12f\n", ans); } return 0; }