#include #include #include #include using namespace std; const double inf=1e100,EPS=1e-6; const int W=20; double l,now; int n; struct wall { double x,y[6],val[5]; } w[W]; //big bug:double->int double length(double x1,double y1,double x2,double y2) { double x=x1-x2,y=y1-y2; return sqrt(x*x+y*y); } double cross(double x1,double y1,double x2,double y2) { return x1*y2-x2*y1; } double same(double x0,double y0,double x3,double y3,double x1,double y1,double x2,double y2) { double x=x3-x0,y=y3-y0;//y0->x0 return cross(x,y,x1-x0,y1-y0)*cross(x,y,x2-x0,y2-y0); } //WA double 判断正负要用 int sign(double d) { if(fabs(d)0? 1:-1; } bool ob(int li,int lj,int ri,int rj) { for(int i=li+1; i>w[i].x; for(int j=1; j<=4; j++)// 又是j { scanf("%lf",&w[i].y[j]); // cin>>w[i].y[j]; } } w[++n].x=10; w[n].y[1]=5; w[n].val[1]=inf;// bug 没赋值 doit(); printf("%.2lf\n",w[n].val[1]); } return 0; }