码迷,mamicode.com
首页 >  
搜索关键字:combination sum ii    ( 27716个结果
概率与统计知识复习
一. 随机变量1.1 概率分布概率分布 定义 : 随机变量X取各个值$x_i$的概率称为X的概率分布. 对于离散型随机变量: $ P(X=x_i)=p_i, (i=1,2,3,...) $ 特性 : a. $p_i>0$ b. $\sum_i^{\infty} p_i =1 $累积概率分布(CDF)...
分类:其他好文   时间:2014-07-16 19:28:51    阅读次数:340
[LeetCode] Combination Sum
1 void func(const vector & candidates, int target, vector & path, int cur , int sum , vector > & ret ) 2 { 3 if( sum == ...
分类:其他好文   时间:2014-07-16 19:24:59    阅读次数:225
nyoj 927 The partial sum problem
The partial sum problem时间限制:1000 ms | 内存限制:65535 KB 难度:2描述One day,Tom’s girlfriend give him an array A which contains N integers and asked him:Can you...
分类:其他好文   时间:2014-07-16 19:24:53    阅读次数:181
【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 r...
分类:其他好文   时间:2014-07-15 23:21:33    阅读次数:218
注意链表的尾部
今天做了Leetcode上面一道题Remove Duplicates from Sorted List II,要去去除链表中重复的节点,代码如下 1 /** 2 * Definition for singly-linked list. 3 * struct ListNode { 4 * ...
分类:其他好文   时间:2014-07-13 21:23:10    阅读次数:160
hdu 2021 发工资咯:)
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=2021题目大意:给老师发工资,找出最少的人民币张数。 1 #include 2 int main () 3 { 4 int a,n,i,sum; 5 while (scanf("%d",...
分类:其他好文   时间:2014-07-13 20:30:07    阅读次数:162
UVa10954
Add All题意:最优二叉树(priority_queue实现)#include #include #include using namespace std;int main(int argc, char *argv[]){ int n, i, j, a, sum[6000]; pri...
分类:其他好文   时间:2014-07-13 20:03:13    阅读次数:218
poj2479 && poj2593Maximum sum(求两个不相交最大字段的和)
poj2479 && poj2593Maximum sum(求两个最大字段的和)...
分类:其他好文   时间:2014-07-13 16:18:14    阅读次数:137
LeetCode——Triangle
Given a triangle, find the minimum path sum from top to bottom. Each step you may move to adjacent numbers on the row below. For example, given the following triangle [ [2], [3,4], [...
分类:其他好文   时间:2014-07-13 16:01:42    阅读次数:209
Java语言的基础知识3
第四章1、sum+=x++;的语句等价于sum=sum+x;和x=x+1;两条语句2、do....while循环语句与while循环语句类似。他们之间的差别是while语句为先判断条件是否成立再执行循环体,而do...while循环语句是先执行一次循环体,在判断条件是否成立。也就是说do....while循环语句至少执行一次..
分类:编程语言   时间:2014-07-13 14:18:10    阅读次数:216
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!