本文是在学习中的总结,欢迎转载但请注明出处:http://blog.csdn.net/pistolove/article/details/47680663
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money...
分类:
其他好文 时间:
2015-08-15 13:34:40
阅读次数:
208
Since we are not allowed to rob two adjacent houses, we keep two variablespreandcur. During thei-th loop,prerecords the maximum profit that we do not ...
分类:
其他好文 时间:
2015-08-15 11:54:05
阅读次数:
114
This problem is a little tricky at first glance. However, if you have finished theHouse Robberproblem, this problem can simply bedecomposed into two H...
分类:
其他好文 时间:
2015-08-15 11:43:56
阅读次数:
105
hdu 3081 Marriage Match IIDescription
Presumably, you all have known the question of stable marriage match. A girl will choose a boy; it is similar as the game of playing house we used to play when we...
分类:
其他好文 时间:
2015-08-12 19:20:41
阅读次数:
124
和LeetCode 198. House Robber类似,应用动态规划,构造数组dp[nums.size()][2][2],
相比LeetCode 198. House Robber, 由于题目将整个房子变成了一个环形,我们在此就多增加了一维k, 用来专门标识是否取nums[0]. 对于dp[i][j][k],
j=0时不取nums[i], j=1时取nums[i];
k=0时不取nu...
分类:
其他好文 时间:
2015-08-12 16:49:11
阅读次数:
145
Apple Tree
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 21587
Accepted: 6551
POJ 3321
链接:
Description
There is an apple tree outside of kaka's house. ...
分类:
移动开发 时间:
2015-08-12 06:46:23
阅读次数:
159
forsake [f?'se?k] vt.放弃;断念。
耶稣被钉死在十字架前说的最后一句话是:My
god,why have you forsaken me!前缀for-表away,opposite,如forgive原谅=to give away等。单词sake n.目的;利益;理由,与seek和seize抓住以及ransake v.洗劫(ran-表house,to seek the...
分类:
其他好文 时间:
2015-08-11 14:16:36
阅读次数:
219
Apple Tree
Time Limit: 2000MS
Memory Limit: 65536K
Total Submissions: 21566
Accepted: 6548
Description
There is an apple tree outside of kaka's house. Every autumn, a...
分类:
移动开发 时间:
2015-08-11 10:13:43
阅读次数:
114
You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping yo...
分类:
其他好文 时间:
2015-08-09 00:13:33
阅读次数:
225
Light Bulb
Time Limit: 1 Second
Memory Limit: 32768 KB
Compared to wildleopard's wealthiness, his brother mildleopard is rather poor. His house is narrow and he has only one light bulb i...
分类:
其他好文 时间:
2015-08-08 12:13:18
阅读次数:
166