https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=2640http://www.spoj.com/problems/SPOINTS/en/htt...
分类:
其他好文 时间:
2015-03-11 09:14:33
阅读次数:
169
//对于任意一点已经覆盖了一些点的圆,都可以通过对圆进行偏移,以使其在保证已覆盖的点的基础上,覆盖更多的点
//对这偏移进行到极限,就是刚好使两点在圆上
//其实这题的思路和POJ1106是差不多的,只不过在看到聚会范围在[0,10]的时候想到随机算法去了
//还有一种n^2logn的做法,学习了一下圆上弧被覆盖次数的标记
#include
#include
#include
using name...
分类:
其他好文 时间:
2015-03-08 14:23:26
阅读次数:
227
Description描述On a circle border there are 2k different points A1, A2, ..., A2k, located contiguously. These points connect k chords so that each of po...
分类:
其他好文 时间:
2015-03-07 11:35:41
阅读次数:
110
DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level...
分类:
编程语言 时间:
2015-03-07 11:22:42
阅读次数:
150
DescriptionSeveral currency exchange points are working in our city. Let us suppose that each point specializes in two particular currencies and perfo...
分类:
其他好文 时间:
2015-03-05 20:46:07
阅读次数:
218
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.思路:自己脑子当机了,总是想着斜率和截距都要相同。但实际上三个点是一条直线的话只要它们的斜率相同就可以了,...
分类:
其他好文 时间:
2015-03-05 14:27:52
阅读次数:
132
Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input
would have exact...
分类:
其他好文 时间:
2015-03-04 17:08:53
阅读次数:
138
Given an array S of n integers, are there elements a, b, c, and d in S such
that a + b + c + d = target? Find all unique quadruplets in the array which gives
the sum of target.
Note:
Element...
分类:
其他好文 时间:
2015-03-04 17:00:29
阅读次数:
137
In Haskell. Two points: 1. pruning 2. Int suffers from overflow. Integer it is.getPowerSum :: Integer -> [Integer] -> Integer -> IntegergetPowerSum _ ...
分类:
其他好文 时间:
2015-03-03 06:20:33
阅读次数:
128
在输入框中尝试输入: 姓名: 总价: {{ quantity * cost }} 总价: 姓名: {{ firstName + " " + lastName }} 姓名: 姓为 {{ person.lastName }} 姓为 第三个值为 {{ points[2] }}...
分类:
Web程序 时间:
2015-03-02 18:54:42
阅读次数:
195