
计算几何
最光阴.
这个作者很懒,什么都没留下…
展开
-
POJ 1269
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, 2) intersect原创 2017-04-17 14:58:11 · 217 阅读 · 0 评论 -
hihocoder收割机14第四题
时间限制:20000ms单点时限:2000ms内存限制:256MB描述主宰尤涅若拥有一招非常厉害的招式——剑刃风暴,“无论是战士还是法师,都害怕尤涅若的武士刀剑技”。现在战场上有N名敌对英雄,他们的位置分别为(Xi, Yi),而剑刃风暴的伤害范围是一个半径为R的圆形,尤涅若可以选择一个坐标作为剑刃风暴的中心,所有处于这个圆形范围内的英雄都会受到剑刃风暴的伤害。现在尤原创 2017-04-17 15:03:38 · 351 阅读 · 0 评论 -
G - Treasure Hunt POJ - 1066
Archeologists from the Antiquities and Curios Museum (ACM) have flown to Egypt to examine the great pyramid of Key-Ops. Using state-of-the-art technology they are able to determine that the lower floor原创 2017-04-20 20:36:49 · 443 阅读 · 0 评论 -
J - Kadj Squares POJ - 3347
In this problem, you are given a sequence S1, S2, …, Sn of squares of different sizes. The sides of the squares are integer numbers. We locate the squares on the positive x-y quarter of the plane, such原创 2017-04-20 21:03:10 · 331 阅读 · 0 评论 -
2017百度之星资格赛:1001. 度度熊保护村庄(计算几何+最小环)
本来以为是一道凸包题目,结果最后看了位大佬的题解才发现是图论的算法。 大佬博客链接 首先对守卫熊的m个点两两一枚举,对于每一次枚举的两个点a, b,去测试所有的n个村庄是否全在这次枚举线段的一侧,如果所有的点都在ab的左边就把m个点中的ab连接一条有向边,如果都在右边,就对ba连一条边,如果全在这条线段就把ab连接一条双向边,除此以外都不连。这样处理后对m个点所建立的图套模板跑一个floyd最小原创 2017-08-07 16:52:34 · 1091 阅读 · 0 评论 -
Regular polygon HDU - 6055
On a two-dimensional plane, give you n integer points. Your task is to figure out how many different regular polygon these points can make.InputThe input file consists of several test cases. Each原创 2017-07-27 19:42:03 · 279 阅读 · 0 评论 -
H - Hard challenge HDU - 6127
思路:对所有的点进行极角坐标排序,然后从最小的点开始,对每个点i,二分查找它的极角逆时针旋转180度的角,在所有点之间的位置。如果这个角坐标的点是L右边的是R,只要求当前点到L点的权值总和,再算R顺时针转到i的权重总和.(这里用线段树维护下)。然后两个权重相乘就是当前直线的权值,然后总体取最大。主要是要想到,对于n个点,做一条过原点的直线,将点集分为两块,这条直线的值就是,直线两边点权重总和乘原创 2017-08-15 19:13:01 · 499 阅读 · 0 评论