码迷,mamicode.com
首页 >  
搜索关键字:max sum plus plus    ( 46271个结果
6-5日
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
LeetCode: Path Sum II [113]
【题目】 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
projecteuler---->problem=21----Amicable numbers
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
leetcode--Sum Root to Leaf Numbers
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
nfd指令的详细说明
在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
SafeArray
API: SafeArrayCreate SafeArrayDestroy SafeArrayGetElement SafeArrayPutElement SafeArrayGetLBound SafeArrayGetUBound1 STDMETHODIMP CMath::Sum(VAR...
分类:其他好文   时间:2014-06-06 10:09:56    阅读次数:150
js变量作用域
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
codeforces --- Round #250 (Div. 2) B. The Child and Set
【题目大意】给你一个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
leetcode--Add Binary
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
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!