尝试一下android studio ,谁知出现路径问题 'tools.jar' seems to be not in Android Studio classpath. Please ensure JAVA_HOME points to JDK rathe jre。打开就出现此错误提示。百度后.....
分类:
移动开发 时间:
2015-08-07 21:54:10
阅读次数:
217
Revenge of Collinearity
Time Limit: 8000/5000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)
Problem Description
In geometry, collinearity is a property of a set of points, s...
分类:
其他好文 时间:
2015-08-07 00:29:30
阅读次数:
132
Intersecting Lines
Time Limit: 1000MS
Memory Limit: 10000K
Total Submissions: 12284
Accepted: 5495
Description
We all know that a pair of distinct points on a plane...
分类:
其他好文 时间:
2015-08-05 18:28:49
阅读次数:
87
题意:
一个以原点为中心的圆,告诉你圆上的一个点,求与另外的两个点组成的三角形的周长最长的两点作标。
思路:
设P(x,y),一个方程是pow(x,2)+pow(y,2)=pow(r,2);另一个方程是根据向量知识,向量的夹角公式得到方程。
因为圆心角夹角为120度,已知一个向量(即一个点作标),所以COS(2PI/3)=a*b/|a|*|b|;(a,b为向量);
已知角和a向量,就可求b向量b(x,y).由方程组可求...
分类:
其他好文 时间:
2015-08-04 21:11:25
阅读次数:
146
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line./** * Definition for a point. * class Point { * i...
分类:
其他好文 时间:
2015-08-01 20:26:30
阅读次数:
118
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.需考虑3类特殊情况:1、x1=x2,斜率无穷大;2、x1=x2,y1=y2,相同点也要计数,当计算最终结果...
分类:
其他好文 时间:
2015-07-31 17:41:36
阅读次数:
82
最近使用valgrind检查代码时,发现了一个比较鬼诡的bug:Syscall param write(buf) points to uninitialised bytes(s) 。在百度上找了很长时间的解决方法,但没有找到。最后用google搞清楚了原因,并解决了这个问题。
这是我主要参考的英文网站:http://comments.gmane.org/gmane.comp.de...
分类:
其他好文 时间:
2015-07-31 10:32:59
阅读次数:
168
题意:求两个点(x,y,z)的连线不经过其他点有几个
解:即为求GCD(x,y,z)为1的点有几个
解一:因为x,y,z均在1~n内,所以可以用欧拉函数解出
解二:莫比乌斯反演
设f[n]为GCD(x,y,z)=n的个数
设F[b]为b|GCD(x,y,z)的个数,很明显F[b]=(n/i)*(n/i)*(n/i)
所以F[n]=sigema(b|n,f[b]);
f[n]=sige...
分类:
其他好文 时间:
2015-07-30 13:33:18
阅读次数:
136
valgrind 调试出现如题所示的错误,原因是存取文件名的空间被释放了源代码: cfg->snteam_cfg->snt.score.nd.wrd_dict_db_fn=cfg->wrd_dict_db_fn;修改之后: cfg->snteam_cfg->snt.heap =...
分类:
其他好文 时间:
2015-07-29 13:36:15
阅读次数:
297
使用测试集spec2006测试cpu性能时,如果完全跑完所有程序,需要数周甚至数月,周期非常长,想得到实验结果,黄花菜都凉了!现在比较认可的做法是从simulation point开始运行,那么如何生成它呢?
使用simpoints工具,自己从头到尾跑一遍生成BBV,再寻找simpoints;
使用前人的现有的simpoints结果,spec2006_simpoints,来源于http://www....
分类:
其他好文 时间:
2015-07-27 23:00:20
阅读次数:
1080