Max Points on a Line开始无脑匹配结果超时:class Solution
{public: int maxPoints(vector &points) { int ans = 0; for (int i = 0; i ans)
ans = num...
分类:
其他好文 时间:
2014-06-29 13:10:03
阅读次数:
268
【题目】
Given a binary tree and a sum, find all root-to-leaf paths where each path's sum equals the given sum.
For example:
Given the below binary tree and sum = 22,
5
/ 4 8
/ / 11 13 4
...
分类:
其他好文 时间:
2014-06-20 10:53:08
阅读次数:
181
Let d(n) be defined as the sum of proper divisors of n (numbers less than
n which divide evenly into n).
If d(a) = b and d(b) = a, where a
b, then a and b are an amicable pair and each of a and
b...
分类:
其他好文 时间:
2014-06-07 13:40:53
阅读次数:
226
Given a binary tree containing digits
from0-9only, each root-to-leaf path could represent a number.An example is the
root-to-leaf path1->2->3which rep...
分类:
其他好文 时间:
2014-06-06 12:38:42
阅读次数:
255
在eterm上执行NFD:SHAPEK/CA*OW指令,返回如下: LN CXR OW RT
FBC/TC RBD MIN/MAX TRVDATE R 01 CA 450.00 ...
分类:
其他好文 时间:
2014-06-06 11:35:14
阅读次数:
403
API: SafeArrayCreate SafeArrayDestroy
SafeArrayGetElement SafeArrayPutElement SafeArrayGetLBound SafeArrayGetUBound1
STDMETHODIMP CMath::Sum(VAR...
分类:
其他好文 时间:
2014-06-06 10:09:56
阅读次数:
150
for(var i =0;i<100;i++) {
}alert(i);//100if(true){ var i="91d"; } alert(i);//91d function add(ad1,ad2){
sum=ad1+ad2; return sum;//如果没有用...
分类:
Web程序 时间:
2014-06-06 09:25:07
阅读次数:
256
【题目大意】给你一个sum和一个limit,现在要你在1~limit中找到一些数来使得这些数的和等于sum,如果能找到的话就输出找到的数的个数和这些数,未找到输出"-1"。比赛的时候被hack了。【题目分析】这题需要将所有的数的lowbit先求出来,然后按照大小排序,然后从后往前判断,如果这个数小于...
分类:
其他好文 时间:
2014-06-05 20:36:44
阅读次数:
307
模糊一般是摄像头焦距没调好造成的画面模糊。原理把图像分割成N*M的区域。求每个区域的对比度:(max-min)/max.求总的平均对比度即为模糊率。三、结果演示
模糊率:0.55 0....
分类:
其他好文 时间:
2014-06-05 14:59:41
阅读次数:
360
Given two binary strings, return their sum
(also a binary string).For example,a ="11"b ="1"Return"100".public class
Solution { /**The program is us...
分类:
其他好文 时间:
2014-06-05 14:08:35
阅读次数:
188