计算几何
计算几何知识题目
Bzdhxs_nt
这个作者很懒,什么都没留下…
展开
-
平面半交板子
Test P4196 [CQOI2006]凸多边形 /【模板】半平面交 #include<bits/stdc++.h> using namespace std; typedef pair<double,double> pdd; #define x first #define y second const double eps = 1e-8; struct Line{ pdd st,ed; }; int sgn(double x){ if(fabs(x) < e原创 2022-04-20 21:11:41 · 166 阅读 · 0 评论 -
H. Are You Safe? 凸包裸题
题目link 思路 求凸包 判点是否在凸包内 注意输出凸包的顺序 Graham算法会方便一些 #include<iostream> #include<cstdio> #include<cmath> #include<algorithm> #include<cstring> #include<string> #include<vector> #include<map> #include<queue>原创 2022-04-19 20:25:12 · 92 阅读 · 0 评论 -
末日将至(简单计算几何)
题目link 思路 简单计算几何 读题! double a,b,k,k1; Point p[100005]; bool check(int i){ if(p[i].y- (p[i].x-a)*k1-b > eps) return true; return false; } void solve(){ cin >>a>>b>>n>>k; forr(i,1,n){ cin>>p[i].x>&原创 2022-04-18 10:51:43 · 169 阅读 · 0 评论