HDU 6097 Mindis (计算几何)】的更多相关文章

题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6097 题意:有一个圆心在原点的圆,给定圆的半径,给定P.Q两点坐标(PO=QO,P.Q不在圆外),取圆上一点D,求PD+QD的最小值. 解法:圆的反演. 很不幸不总是中垂线上的点取到最小值,考虑点在圆上的极端情况. 做P点关于圆的反演点P',OPD与ODP'相似,相似比是|OP| : r. Q点同理. 极小化PD+QD可以转化为极小化P'D+Q'D. 当P'Q'与圆有交点时,答案为两点距离,否则最优…
题意:给一个圆C和圆心O,P.Q是圆上或圆内到圆心距离相等的两个点,在圆上取一点D,求|PD| + |QD|的最小值 析:首先这个题是可以用三分过的,不过也太,.... 官方题解: 很不幸不总是中垂线上的点取到最小值,考虑点在圆上的极端情况. 做P点关于圆的反演点P',OPD与ODP'相似,相似比是|OP| : r. Q点同理. 极小化PD+QD可以转化为极小化P'D+Q'D. 当P'Q'与圆有交点时,答案为两点距离,否则最优值在中垂线上取到. 时间复杂度 O(1)O(1) 也有代数做法,结论相…
Mindis Time Limit: 6000/3000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)Total Submission(s): 2787    Accepted Submission(s): 555Special Judge Problem Description The center coordinate of the circle C is O, the coordinate of O is (0,…
题目链接 Problem Description The center coordinate of the circle C is O, the coordinate of O is (0,0) , and the radius is r. P and Q are two points not outside the circle, and PO = QO. You need to find a point D on the circle, which makes PD+QD minimum.…
HDU 4998 Rotate (计算几何) 题目链接http://acm.hdu.edu.cn/showproblem.php?pid=4998 Description Noting is more interesting than rotation! Your little sister likes to rotate things. To put it easier to analyze, your sister makes n rotations. In the i-th time, s…
/* hdu 4643 GSM 计算几何 - 点线关系 N个城市,任意两个城市之间都有沿他们之间直线的铁路 M个基站 问从城市A到城市B需要切换几次基站 当从基站a切换到基站b时,切换的地点就是ab的中垂线与铁路的交点(记录由哪两个基站得到的交点,方便切换)处 枚举任意两个基站与铁路的交点,按到城市A的距离排序 求出在城市A时用的基站j,然后开始遍历交点,看从j可以切换到哪个基站(假设是k),然后再看可以从k可以切换到哪个基站 */ #include<stdio.h> #include<…
题目链接 :http://acm.hdu.edu.cn/showproblem.php?pid=6670 Mindis Time Limit: 4000/2000 MS (Java/Others) Memory Limit: 131072/131072 K (Java/Others) Total Submission(s): 548 Accepted Submission(s): 119 Problem Description 平面上有 n 个矩形,矩形的边平行于坐标轴,现在度度熊需要操控一名角…
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=1174 解题报告:就是用到了三维向量的点积来求点到直线的距离,向量(x1,y1,z1)与(x2,y2,z2)的点积是:x1*x2+y1*y2+z1*z2. 然后要注意的就是当两个向量的夹角大于等于90度时,无论如何都不能射中. #include<cstdio> #include<cstring> #include<iostream> #include<algorithm…
链接:http://acm.hdu.edu.cn/showproblem.php?pid=1086 You can Solve a Geometry Problem too Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7167    Accepted Submission(s): 3480 Problem Description Ma…
链接:http://acm.hdu.edu.cn/showproblem.php?pid=4613 题意: 判断一个集合中的点能不能由另一个集合中的点,通过平移,旋转,放缩得到~ 思路:先求出集合中的点的凸包,然后枚举每一条边作为起点 ,看原集合中的点能否与要比较的集合中的点一一对应~ #include <iostream> #include <cstdio> #include <algorithm> #include <functional> #inclu…