码迷,mamicode.com
首页 >  
搜索关键字:combination sum ii    ( 27716个结果
[leetcode]Best Time to Buy and Sell Stock II @ Python
原题地址:https://oj.leetcode.com/problems/best-time-to-buy-and-sell-stock-ii/题意:Say you have an array for which theithelement is the price of a given stoc...
分类:编程语言   时间:2014-06-06 20:04:46    阅读次数:400
[leetcode]Triangle @ Python
原题地址:https://oj.leetcode.com/problems/triangle/题意:Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent n...
分类:编程语言   时间:2014-06-06 17:31:34    阅读次数:397
hdu 3415 Max Sum of Max-K-sub-sequence
Problem DescriptionGiven a circle sequence A[1],A[2],A[3]......A[n]. Circle sequence means the left neighbour of A[1] is A[n] , and the right neighbou...
分类:其他好文   时间:2014-06-06 14:52:21    阅读次数:247
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
SafeArray
API: SafeArrayCreate SafeArrayDestroy SafeArrayGetElement SafeArrayPutElement SafeArrayGetLBound SafeArrayGetUBound1 STDMETHODIMP CMath::Sum(VAR...
分类:其他好文   时间:2014-06-06 10:09:56    阅读次数:150
Get the largest sum of contiguous subarray in an int array
When I finished reading this problem,I thought I could solve it by scan every single subarray in the array,and the time complexity is cubic.Every su.....
分类:其他好文   时间:2014-06-04 15:30:52    阅读次数:255
Transformation(线段树多个lz标记)
这里以3次方来举例讲一下这题的做法,其它维类似。如果要求某一个值的3次方那么sum = t^3,设t = x+y。那也就是sum = (x+y)^3.假如我让每个数都加z t = x+y+z,我可以让新的y = y+z,这里发现新来的总会加在y上,那么可以给他一个延迟,slz,那么新的值t = t ...
分类:其他好文   时间:2014-06-03 16:14:05    阅读次数:349
[再寄小读者之数学篇](2014-06-03 计算两个无穷级数)
(from zhangwuji) $$\bex \sum\limits_{n=0}^{\infty}\dfrac{n^3+2n+1}{(n^4+n^2+1)n!},\quad \sum\limits_{n=0}^{\infty}\dfrac{1}{(n^4+n^2+1)n!}. \eex$$解答: ...
分类:其他好文   时间:2014-06-03 15:31:55    阅读次数:252
Vijos 1243 生产产品 (优先队列优化的动态规划)
题意:中文题。不说了。注意一些地方,机器的执行过程是没有顺序的,而且每个机器可以用多次。第一次执行的机器不消耗转移时间K。用dp[i][j]表示第i个机器完成第j个步骤的最短时间,sum[j][i]表示第i个机器完成前j个步骤的时间。比较容易想到一个朴素的状态转移方程:dp[i][j]=min{dp...
分类:其他好文   时间:2014-06-02 19:48:58    阅读次数:261
hdu---1024Max Sum Plus Plus(动态规划)
Max Sum Plus PlusTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 15898Accepted Submission(s): 5171...
分类:其他好文   时间:2014-06-02 14:59:54    阅读次数:247
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!