We have a circle of radius R and several line segments situated within the circumference of this circle. Let’s define acool pointto be a point on the ...
分类:
其他好文 时间:
2014-12-19 13:02:44
阅读次数:
236
ndk开发常见错误1. android.mk文件不存在 $ ndk-buildAndroid NDK: Your APP_BUILD_SCRIPT points to an unknown file: ./jni/Android.mk /cygdrive/h/heima6/jni2/ziliao/....
分类:
其他好文 时间:
2014-12-19 00:35:53
阅读次数:
235
题意:UVa 10820这两个题是同一道题目,只是公式有点区别。给出范围为(0, 0)到(n, n)的整点,你站在原点处,问有多少个整点可见。对于点(x, y), 若g = gcd(x, y) > 1,则该点必被点(x/g, y/g)所挡住。因此所见点除了(1, 0)和(0, 1)满足横纵坐标互素。...
分类:
其他好文 时间:
2014-12-18 06:48:18
阅读次数:
144
QUESTIONGiven n points on a 2D plane, find the maximum number of points that lie on the same straight line.1ST TRY/** * Definition for a point. * stru...
分类:
其他好文 时间:
2014-12-16 23:55:56
阅读次数:
201
http://www.lydsy.com/JudgeOnline/problem.php?id=3053本来是1a的QAQ。。。。没看到有多组数据啊。。。。。斯巴达!!!!!!!!!!!!!!!!!本题裸的kdtree,比上一题还要简单。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。。...
分类:
其他好文 时间:
2014-12-16 18:57:22
阅读次数:
389
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line.Solution: 1 /** 2 * Definition for a point. 3 ...
分类:
其他好文 时间:
2014-12-16 06:30:33
阅读次数:
249
bzoj 3053 HDU 4347 : The Closest M Points kd树题目大意:求k维空间内某点的前k近的点。就是一般的kd树,根据实测发现,kd树的两种建树方式,即按照方差较大的维度分开(建树常数大)或者每一位轮换分割(询问常数大),后者更快也更好些,以后就果断写第二种了。#i...
分类:
其他好文 时间:
2014-12-08 17:20:35
阅读次数:
533
7.6 在二维平面上,有一些点,请找出经过点数最多的那条线。解法:类似于leetcode:Max Points on a Line我们只需在任意两点之间“画”一条无限长的直线(也即不是线段),并利用散列表追踪哪条直线出现的次数最多。这种做法的时间复杂度O(n^2),因为一共有n^2条线段。通过将每一...
分类:
其他好文 时间:
2014-12-07 11:19:53
阅读次数:
143
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line./** * Definition for a point. * struct Point { * ...
分类:
其他好文 时间:
2014-12-03 12:05:12
阅读次数:
181