随笔分类 - 计算几何
摘要:#include <iostream> #include <cmath> #define M_PI acos(-1.0) using namespace std; /* get angle ACB, point C is the center point A(x1,y1) B(x2,y2) C(x3
阅读全文
摘要:#include <iostream> #include <cstring> #include <iomanip> #include <algorithm> #include <queue> #include <stack> #include <vector> #include <set> #inc
阅读全文
摘要:struct node { double x,y; } p[MS]; node get_center(double x1,double y1,double x2,double y2,double x3,double y3) { double A,B,C,D,x,y,r; double x1x1 =
阅读全文
摘要:vector<Pair> calc(double x1 , double y1 , double r1 , double x2 , double y2 , double r2) { x1-=x2,y1-=y2; double S=x1*x1+y1*y1,a=(S+r2*r2-r1*r1)/2,D=S
阅读全文
摘要:前置 struct point { //存储点 double x,y; }; double cross(double x1,double y1,double x2,double y2){ //计算叉积 return (x1*y2-x2*y1); } double compare(point a,po
阅读全文
摘要:题链 退火法 #include <iostream> #include<cstdio> #include<algorithm> #include<cstring> #include<cmath> #define eps 1e-7 #define MS 50 using namespace std;
阅读全文
摘要:题链 #include<bits/stdc++.h>//O(n),最小圆覆盖 #define eps 1e-12 using namespace std; int n,m; struct node { double x, y; } s[500005]; node o;//圆心坐标 double ri
阅读全文

浙公网安备 33010602011771号