![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
几何问题
orzqqqqqqq
这个作者很懒,什么都没留下…
展开
-
牛客网暑期ACM多校训练营(第三场)J.Distance to Work
题意:找出以工作地点为圆心的圆交多边形的面积比上多边形面积为(1-(P/Q)).题解:贴一个圆交多边形面积的模版,以及求多边形面积的模版,然后二分一下半径即可#include"bits/stdc++.h"using namespace std;const int MX = 222;const double eps = 1e-12;const double PI = acos( ...原创 2018-07-27 15:42:44 · 221 阅读 · 0 评论 -
gym-100520 K. Kabbalah for Two
就是跟大白279页的题有点类似的模版题而已。#include"bits/stdc++.h"using namespace std;const int MX = 207;const double eps = 1e-12;int n;struct Point { double x, y; Point() {} Point(double x,double y)...原创 2018-11-11 14:59:12 · 181 阅读 · 0 评论 -
gym 101623 G .Glyph Recognition
二分两个多边形大小。附上一堆板子#include<bits/stdc++.h>#define mp make_pair#define fir first#define sec secondusing namespace std;typedef long long ll;const double eps = 1e-12;const double PI = acos(-...原创 2018-10-30 23:28:40 · 174 阅读 · 0 评论 -
gym101962 G. Barra Lighthouse
简单计算几何分类讨论一下#include<bits/stdc++.h>#define mp make_pair#define fir first#define sec secondusing namespace std;typedef long long ll;const double eps = 1e-12;const double PI = acos(-1.0)...原创 2018-10-30 21:10:30 · 288 阅读 · 0 评论 -
codeforces 1046I. Say Hell
题目连接题意:两个人沿着直线行走,如果他们之间距离小于d1,就会打招呼,在打完招呼后的某个时间点(共N个时间点),他们两人之间的距离>d2,那么下一次他们之间距离再次小于d1时会再打招呼。题解:可以将两条线段之间的最短距离转化为点与线段的最短距离,然后就是改一下大白上点到线段上距离的模版即可。#include"bits/stdc++.h"using namespace s...原创 2018-09-24 15:11:18 · 208 阅读 · 0 评论 -
hdu 6158 The Designer
题解 精度还是卡的很厉害.....,改成1e-12也会wa#include"bits/stdc++.h"using namespace std;const double PI = acos(-1.0);const double eps = 1e-13;double sqr(double x) { return x*x;}int main() {#ifdef LOC...原创 2018-08-31 16:48:59 · 149 阅读 · 0 评论 -
hdu 3932 Groundhog Build Home
最小圆覆盖。随机增量法。测试模版#include"bits/stdc++.h"using namespace std;const double eps = 1e-12;struct Point { double x, y; Point() {} Point(double x,double y):x(x),y(y) {}};typedef Point Vec...原创 2018-08-28 09:42:25 · 102 阅读 · 0 评论 -
hdu 4773 Problem of Apollonius
题解:圆的反演,测试一下模版。他人详细讲解#include"bits/stdc++.h"using namespace std;const double eps = 1e-12;struct Point { double x, y; Point() {} Point(double x,double y):x(x),y(y) {} void prin...原创 2018-08-28 01:03:54 · 137 阅读 · 0 评论 -
hdu 5928 Birthday Gift
题解:先选出枚举一个点i作为坐标原点,然后以其他的点作极角排序(逆时针旋转)。然后 d[j][k] 代表 以j作为i的逆时针旋转凸包的最后一个点,存在于 i ~ j 中的点的个数为k个,(dp时只记录了i~j的单程的距离,最后一步没有合上。需要闭合的凸包的话还需要把 i ~ j 的距离(Length(i~j))给加上。#include"bits/stdc++.h"using namespa...原创 2018-08-23 13:22:33 · 229 阅读 · 0 评论 -
hdu 6398 Pizza Hub
题解:枚举每条边,每条边考虑三种情况,当前边(重合于x轴,重合于y轴,倾斜x轴某一角度A)#include <bits/stdc++.h>using namespace std;typedef long long LL;typedef pair<int, int> pii;const int mod = 998244353;const int MX = 1...原创 2018-08-15 23:50:29 · 191 阅读 · 0 评论 -
GYM 101002 G Symmetry
暴力枚举中心点和对称的线段,注意点在线段上的情况,以及许多点都在一条直线上的情况。#include<bits/stdc++.h>#define pb push_back#define fuck(x) cout<<'['<<#x<<' '<<x<<']'<<endlusing namespace std;原创 2018-11-17 21:28:33 · 200 阅读 · 0 评论