计算几何
cjmHK
努力做得更好
展开
-
Catching Fish(HDU-1077)
Problem Description Ignatius likes catching fish very much. He has a fishnet whose shape is a circle of radius one. Now he is about to use his fishnet to catch fish. All the fish are in the lake, and ...原创 2019-04-07 12:43:48 · 280 阅读 · 0 评论 -
Intersecting Lines(POJ-1269)
Description We all know that a pair of distinct points on a plane defines a line and that a pair of lines on a plane will intersect in one of three ways: 1) no intersection because they are parallel, ...原创 2019-03-29 02:12:40 · 871 阅读 · 0 评论 -
Rectangle and Circle(HDU-1221)
对于计算几何的题目首先是要画草图,找出关系。这道题的意思大致是判断园与矩形是否相切或相交。 其实要相切或相交只要满足两个条件:一是圆心与边的最短距离小于圆的半径,二是圆心与边的最大距离大于圆的半径。 第一个条件保证与园最近的一条边与园相交或相切或者在园内,第二个条件保证园没有包含整个矩形。 现在关键就是要求出最短距离和最大距离。 最短距离:先计算出圆心与四条边的最短距离,然后取最小值,就是所要求...原创 2018-09-25 00:12:48 · 133 阅读 · 0 评论