#include<cmath>
#include<queue>
#include<cstdio>
#include<cctype>
#include<vector>
#include<cstring>
#include<iostream>
#include<algorithm>
using namespace std;
typedef double db;
const db pi=acos(-1),eps=1e-10;
struct Point
{
db x,y;
Point(db x0=0,db y0=0) : x(x0) , y(y0) { }
friend bool operator<(Point a,Point b)
{
return a.x!=b.x?a.x<b.x:a.y<b.y;
}
friend Point operator+(const Point &a,const Point &b)
{
return Point(a.x+b.x,a.y+b.y);
}
friend Point operator-(const Point &a,const Point &b)
{
return Point(a.x-b.x,a.y-b.y);
}
friend Point operator*(const Point &a,double b)
{
return Point(a.x*b,a.y*b);
}
friend Point operator/(const Point &a,double b)
{
return Point(a.x/b,a.y/b);
}
}a,b,c,ans;
typedef Point Vector;
db dcmp(db x)//符号判断
{
if(fabs(x)<eps)return 0;
else return
板子:计算几何
最新推荐文章于 2023-02-12 01:57:56 发布