摘要:
半平面交,二分;注意,题目的点是顺时针给出的; 1 #include 2 #include 3 #include 4 #define maxn 50010 5 #define eps 1e-6 6 using namespace std; 7 8 int dcmp(double x) 9 { 10 return fabs(x) 0 ? 1 : -1); 11 } 12 13 struct Point 14 { 15 double x; 16 double y; 17 Point(double x = 0, double y = 0):x(... 阅读全文
摘要:
半平面交的题;这个题目的亮点就是建模; 1 #include 2 #include 3 #include 4 #define maxn 109 5 #define eps 1e-6 6 using namespace std; 7 8 int dcmp(double x) 9 { 10 return fabs(x) 0 ? 1 : -1); 11 } 12 13 struct Point 14 { 15 double x; 16 double y; 17 Point(double x = 0, double y = 0):x(x), y(... 阅读全文
摘要:
半平面的交,二分的方法; 1 #include 2 #include 3 #include 4 #define eps 1e-6 5 using namespace std; 6 7 int dcmp(double x) 8 { 9 return fabs(x) 0 ? 1 : -1); 10 } 11 12 struct Point 13 { 14 double x; 15 double y; 16 Point(double x = 0, double y = 0):x(x), y(y) {} 17 }; 18 typedef Poin... 阅读全文