// ACM-ICPC国内予選2013 E. つながれた風船 #include #include #include #include #include using namespace std; const double EPS = 1e-10; typedef complex P; typedef pair circle; double cross(P a, P b) { return imag(conj(a)*b); } bool containPoint(const circle& c, const P& p){ double dist = abs(c.first-p); return dist < c.second+EPS; } bool crossCircle(const circle& c1, const circle& c2){ double r1 = c1.second; double r2 = c2.second; double d = abs(c1.first-c2.first); if(dEPS; return r1+r2-d>-EPS; } void crossPoint(vector

&res, const circle& c1, const circle& c2){ double r1 = c1.second; double r2 = c2.second; double r3 = abs(c1.first-c2.first); double rc = (r3*r3+r1*r1-r2*r2)/(2*r3); double rs = sqrt(r1*r1-rc*rc); P dif = (c2.first-c1.first)/r3; res.push_back(c1.first+dif*P(rc, rs)); res.push_back(c1.first+dif*P(rc,-rs)); } bool valid(const vector& vc){ vector

vp; for(int i=0;i> n && n){ int minL = 100000; for(int i=0;i> x[i] >> y[i] >> l[i]; minL = min(minL, l[i]); } double low = 1.0, high = minL; for(int i=0;i<200;i++){ double mid = 0.5*(low+high); vector vc; for(int j=0;j