text: Output For each data set, output in one line the length for which he has to walk in the sunshine at least.Your program may output an arbitrary number of digits after the decimal point.However, the error should be 0.001 or less.Example Input 1 1 4 10 0 0 10 0 10 10 0 10 -5 -20 30 15 135 45 0 -15 15 0 0 0 Output 11.213 # Solution #include <iostream> #include <iomanip> #include <complex> #include <vector> #include <algorithm> #include <cmath> #include <array> #include <utility> #include <map> using namespace std; const double EPS = 1e-6; const double INF = 1e12; const double PI = acos(-1); #define EQ(n,m) (abs((n)-(m)) < EPS) #define X real() #define Y imag() typedef complex<double> P; typedef vector<P> VP; struct L : array<P, 2>{ L(const P& a, const P& b){ at(0)=a; at(1)=b; } L(){} }; namespace std{ bool operator < (const P& a, const P& b){ return !EQ(a.X,b.X) ?a.X<b.X : a.Y+EPS<b.Y; } bool operator == (const P& a, const P& b){ return abs(a-b) < EPS; } } double dot(P a, P b){ return (conj(a)*b).X; } double cross(P a, P b){ return (conj(a)*b).Y; } int ccw(P a, P b, P c){ b -= a; c -= a; if(cross(b,c) > EPS) return +1; //ccw if(cross(b,c) < -EPS) return -1; //cw if(dot(b,c) < -EPS) return +2; //c-a-b if(abs(c)-abs(b) > EPS) return -2; //a-b-c return 0; //a-c-b } bool intersectSS(const L& a, const L& b){ return ( ccw(a[0],a[1],b[0]) *ccw(a[0],a[1],b[1]) <= 0 ) && ( ccw(b[0],b[1],a[0]) *ccw(b[0],b[1],a[1]) <= 0 ); } bool intersectSP(const L& s, const P &p){ return abs(cross(s[0]-p, s[1]-p))<EPS && dot(s[0]-p, s[1]-p)<EPS; } bool isParallel(const P &a, const P &b){ return abs(cross(a,b)) < EPS; } bool isParallel(const L &a, const L &b){ return isParallel(a[1]-a[0], b[1]-b[0]); } P crosspointLL(const L &l, const L &m) { double A = cross(l[1]-l[0], m[1]-m[0]); double B = cross(l[1]-l[0], l[1]-m[0]); return m[0] + B/A *(m[1]-m[0]); } int in_poly(const P &p, const VP &poly){ int n = poly.