poj 2284
欧拉公式:如果G是一个阶为n、边数为m、且含有r个区域的联通平面图,则有恒等式:n-m+r=2
#include<stdio.h>
#include<string.h>
#include<math.h>
#include<algorithm>
using namespace std;
#define eps 1e-10
#define maxn 90000
struct Point//点
{
double x,y;
Point(double a=0,double b=0)
{
x=a,y=b;
}
};
struct LineSegment//线段
{
Point s,e;
LineSegment(Point a,Point b)
{
s=a,e=b;
}
};
struct Line//直线
{
double a,b,c;
};
bool operator <(Point p1,Point p2)
{
return p1.x<p2.x||p1.x==p2.x&&p1.y<p2.y;
}
bool operator ==(Point p1,Point p2)
{
return fabs(p1.x-p2.x)<eps&&fabs(p1.y-p2.y