码迷,mamicode.com
首页 >  
搜索关键字:two sum    ( 31846个结果
Combinations [leetcode]
描述: Given two integersnandk, return all possible combinations ofknumbers out of 1 ...n.For example,Ifn= 4 andk= 2, a solution is:[ [2,4], [3,4], [2...
分类:其他好文   时间:2014-07-16 19:29:31    阅读次数:166
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
Add Two Numbers
You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a link...
分类:其他好文   时间:2014-07-13 18:20:52    阅读次数:202
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
Same Tree
Given two binary trees, write a function to check if they are equal or not. Two binary trees are considered equal if they are structurally identical and the nodes have the same value. /** * Defin...
分类:其他好文   时间:2014-07-13 15:50:25    阅读次数:158
HDU1003 Max Sum(求最大字段和)
HDU1003 Max Sum(求最大字段和)...
分类:其他好文   时间:2014-07-13 15:33:13    阅读次数:180
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
[ACM] POJ 3349 Snowflake Snow Snowflakes(哈希查找,链式解决冲突)
Snowflake Snow Snowflakes Time Limit: 4000MS   Memory Limit: 65536K Total Submissions: 30512   Accepted: 8024 Description You may have heard that no two snowflakes are al...
分类:其他好文   时间:2014-07-13 13:45:20    阅读次数:235
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!