描述: 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
题目链接: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
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
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(求两个最大字段的和)...
分类:
其他好文 时间:
2014-07-13 16:18:14
阅读次数:
137
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
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(求最大字段和)...
分类:
其他好文 时间:
2014-07-13 15:33:13
阅读次数:
180
第四章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
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