#include #include #include #include #include using namespace std; typedef float ff; struct point{ff x, y;}; ff signedarea(const point& A, const point& B, const point& C) {return ((B.x-A.x)*(C.y-A.y)-(B.y-A.y)*(C.x-A.x))/2.0;} bool cross(const point& l11, const point& l12, const point& l21, const point& l22) {return ((signedarea(l21, l22, l11)<0 && signedarea(l21, l22, l12)>0) || (signedarea(l21, l22, l11)>0 && signedarea(l21, l22, l12)<0)) && ((signedarea(l11, l12, l21)<0 && signedarea(l11, l12, l22)>0) || (signedarea(l11, l12, l21)>0 && signedarea(l11, l12, l22)<0)); } ff dist(const point&A, const point& B) {return sqrt((B.x-A.x)*(B.x-A.x)+(A.y-B.y)*(A.y-B.y));} int main(int, char**) { ifstream ifile("ee.in"); int K; ifile>>K; for (int x=1; x<=K;++x) { cout<<"Data Set "<>n>>r>>p; vector walls(n); for (int i=0; i>walls[i].x>>walls[i].y; walls.push_back(walls.front()); vector routers(r); for (int i=0; i>routers[i].x>>routers[i].y; //compute for (int i=0; i>pp.x>>pp.y; for (int j=0; jstrength) strength=1.0/dd/dd; } //output cout.precision(2); cout<