详细见https://blog.csdn.net/islittlehappy/article/details/81533090
准备的变量和函数
struct Point{
double x,y;
Point(){
}
Point(double xx,double yy){
x=xx;
y=yy;
}
};
Point operator+(Point a,Point b){
//向量加
return Point(a.x+b.x,a.y+b.y);
}
Point operator-(Point a,Point b){
//向量减
return Point(a.x-b.x,a.y-b.y);
}
double sqr(double x){
return x*x;
}
double dis(Point a