状压dp+凸包 并没有看出来凸包的性质 首先答案一定在凸包上,然后每个凸包的角加起来是一个圆,那么就相当于凸包周长加一个圆了。然后预处理,再状压dp计算即可。 ...
分类:
其他好文 时间:
2017-07-09 10:26:46
阅读次数:
133
poj——3177Redundant Paths 洛谷—— P2860 [USACO06JAN]冗余路径Redundant Paths Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15272 Accepted: 6436 De ...
分类:
其他好文 时间:
2017-07-01 18:28:58
阅读次数:
293
$O(n^2)$建Voronoi图,求对偶图后BFS即可 用Canvas写了个可视化 想写增量算法和Fortune算法,可是我好菜啊orz point的cmp写错了,调试了很久,要一直记得精度啊,用sgn函数,否则不满足偏序 半平面交抄板子都能抄错orz 此外写代码最好一气呵成,别磨叽,这东西我写了 ...
分类:
其他好文 时间:
2017-07-01 01:01:40
阅读次数:
252
题目链接: http://poj.org/problem?id=1329 题目描述: Circle Through Three Points Description Your team is to write a program that, given the Cartesian coordinat ...
分类:
其他好文 时间:
2017-06-29 00:55:02
阅读次数:
211
题目链接: huangjing 题意:给了三种操作 1:add(x,y)将这个点增加二维坐标系 2:remove(x,y)将这个点从二维坐标系移除。 3:find(x,y)就是找到在(x,y)右上方的第一个点。 思路:我们能够建立n个set以x为横坐标,那么我们这个题就转化为找一个最小的x是否存在满 ...
分类:
其他好文 时间:
2017-06-28 20:18:06
阅读次数:
182
题意:给出n个点,要求排序后,相邻两点的欧拉距离之和小于等于2.5e9做法:由于0≤?xi,?yi?≤?1e6,所以可以将x<=1000的点分成一份,1000<x<=2000的点分成第二份,以此类推,分成一千份。然后每一份中的点都按照y单调排序。拿任意一份点做实验,如果从最小的y开始往上走,那么y的 ...
分类:
其他好文 时间:
2017-06-24 23:41:49
阅读次数:
205
题目描述 Description Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled ...
分类:
其他好文 时间:
2017-06-21 18:54:46
阅读次数:
251
绝对单位 px: Pixel 像素 pt: Points 磅 pc: Picas 派卡 in: Inches 英寸 mm: Millimeter 毫米 cm: Centimeter 厘米 q: Quarter millimeters 1/4毫米 相对单位 %: 百分比 em: Element met ...
分类:
Web程序 时间:
2017-06-20 20:12:23
阅读次数:
180
计算xy的最近值。 代码如下: package Day05; import java.util.Arrays; public class FindNearestPoints { public static void main(String[] args) { double[][] points = ...
分类:
其他好文 时间:
2017-06-20 19:12:33
阅读次数:
141
class table1 { char<8> f1; char<80> f2; uint4 f3; uint4 f4; double f5; uint4 f6; uniquetree<f1,f2> Idx1; tree<f6>Idx2; }; Steps: step1:find(Idx1=(a,b) ...
分类:
数据库 时间:
2017-06-19 18:39:02
阅读次数:
158