正文
增加 5 行删除 5 行
24 行未改动25262728293031323334 行未改动68697071727374757685 行未改动162163164165166167168169170107 行未改动全部展开27827928028128228328428528632 行未改动319320321322323324325326327177 行未改动全部展开24 行未改动#define D double#define V void#define B boolint n,t; B lcd[205];//part 1:3-D geograhpic calculationconst double eps=1e-9;bool equal(D x,D y){return fabs(x-y)<eps;}D prc(D x){return min(max(x,-1.0),1.0);}//precision problem!!struct vec{34 行未改动//cout<<ll.ang(x.l)/x.rot<<" "<<to.ang(x.d)/(x.u.dot(to)>0?x.anl:x.anr)<<" "<<tmp/x.mx<<"\n";return ll.ang(x.l)/x.rot+to.ang(x.d)/(x.u.dot(to)>=0?x.anl:x.anr)+tmp/x.mx;//side to side,up and down,straight foward}V movp(plane &x,vec to){if(equal(to.len(),0)){snake(x);return;}vec ll=x.d.crs(to.uni(to));if(equal(ll.len(),0)) ll=x.l;else{ll=ll.uni(ll);if(ll.dot(x.l)<0) ll=-ll;}x.p=x.p+to,x.d=to.uni(to),x.l=ll,x.u=x.d.crs(x.l);85 行未改动if(x.d.dot(y.p-x.p)<0||x.d.ang(y.p-x.p)>x.anb) return 0;return 1;}V strategm(missle &x){//cout<<x.tg<<"\n";if(!x.tg||x.lft<=0) return;I len=x.mx;vec to;D l,mi=2e9,ml=2e9,mil=2e9;missle ch,id,idl;plane y=p[x.tg];//y.p.out();y.mvt.out();movp(y,y.mvt-y.p);for(I i=-len;i<=len;i++){107 行未改动全部展开#define D double#define V void#define B boolint n,t; B lcd[205];//part 1:3-D geograhpic calculationconst double eps=1e-9;bool equal(D x,D y){return fabs(x-y)<eps;}D prc(D x){return min(max(x,-1.0),1.0);}//precision problem!!struct vec{32 行未改动else{ll=ll.uni(ll);if(ll.dot(x.l)<0) ll=-ll;}return ll.ang(x.l)/x.rot+to.ang(x.d)/(x.u.dot(to)>=0?x.anl:x.anr)+tmp/x.mx;//side to side,up and down,straight foward}V movp(plane &x,vec to){if(equal(to.len(),0)){snake(x);return;}vec ll=x.d.crs(to.uni(to));if(equal(ll.len(),0)) ll=x.l;else{ll=ll.uni(ll);if(ll.dot(x.l)<0) ll=-ll;}x.p=x.p+to,x.d=to.uni(to),x.l=ll,x.u=x.d.crs(x.l);177 行未改动全部展开24 行未改动25262728293031323334 行未改动68697071727374757685 行未改动162163164165166167168169170107 行未改动全部展开27827928028128228328428528632 行未改动319320321322323324325326327177 行未改动全部展开24 行未改动#define D double#define V void#define B boolint n,t; B lcd[205];//part 1:3-D geograhpic calculationconst double eps=1e-9;bool equal(D x,D y){return fabs(x-y)<eps;}D prc(D x){return min(max(x,-1.0),1.0);}//precision problem!!struct vec{34 行未改动//cout<<ll.ang(x.l)/x.rot<<" "<<to.ang(x.d)/(x.u.dot(to)>0?x.anl:x.anr)<<" "<<tmp/x.mx<<"\n";return ll.ang(x.l)/x.rot+to.ang(x.d)/(x.u.dot(to)>=0?x.anl:x.anr)+tmp/x.mx;//side to side,up and down,straight foward}V movp(plane &x,vec to){if(equal(to.len(),0)){snake(x);return;}vec ll=x.d.crs(to.uni(to));if(equal(ll.len(),0)) ll=x.l;else{ll=ll.uni(ll);if(ll.dot(x.l)<0) ll=-ll;}x.p=x.p+to,x.d=to.uni(to),x.l=ll,x.u=x.d.crs(x.l);85 行未改动if(x.d.dot(y.p-x.p)<0||x.d.ang(y.p-x.p)>x.anb) return 0;return 1;}V strategm(missle &x){//cout<<x.tg<<"\n";if(!x.tg||x.lft<=0) return;I len=x.mx;vec to;D l,mi=2e9,ml=2e9,mil=2e9;missle ch,id,idl;plane y=p[x.tg];//y.p.out();y.mvt.out();movp(y,y.mvt-y.p);for(I i=-len;i<=len;i++){107 行未改动全部展开#define D double#define V void#define B boolint n,t; B lcd[205];//part 1:3-D geograhpic calculationconst double eps=1e-9;bool equal(D x,D y){return fabs(x-y)<eps;}D prc(D x){return min(max(x,-1.0),1.0);}//precision problem!!struct vec{32 行未改动else{ll=ll.uni(ll);if(ll.dot(x.l)<0) ll=-ll;}return ll.ang(x.l)/x.rot+to.ang(x.d)/(x.u.dot(to)>=0?x.anl:x.anr)+tmp/x.mx;//side to side,up and down,straight foward}V movp(plane &x,vec to){if(equal(to.len(),0)){snake(x);return;}vec ll=x.d.crs(to.uni(to));if(equal(ll.len(),0)) ll=x.l;else{ll=ll.uni(ll);if(ll.dot(x.l)<0) ll=-ll;}x.p=x.p+to,x.d=to.uni(to),x.l=ll,x.u=x.d.crs(x.l);177 行未改动全部展开