挺有意思的动态规划题目,只和i-2和i-3家的状态有关,取其中最大值public class Solution { public int rob(int[] nums) { int length = nums.length; if (length == 0) { ...
分类:
其他好文 时间:
2015-11-27 06:45:12
阅读次数:
173
题意:求给出图的表面积,不包括底面///1085422276#includeusing namespace std ;typedef long long ll;#define mem(a) memset(a,0,sizeof(a))#define meminf(a) memset(a,127,siz...
分类:
其他好文 时间:
2015-11-19 14:59:53
阅读次数:
192
接着之前的[css]我要用css画幅画(三), 今天,我画了两朵云,并给小明介绍了个朋友:静静。github:https://github.com/bee0060/Css-Paint, 完整代码在pages/sun-house-4.html和相关的css中可以找到demo:http://bee006...
分类:
Web程序 时间:
2015-11-17 00:16:29
阅读次数:
237
After robbing those houses on that street, the thief has found himself a new place for his thievery so that he will not get too much attention. This t...
分类:
其他好文 时间:
2015-11-15 10:50:13
阅读次数:
360
1243. Divorce of the Seven DwarfsTime limit: 1.0 secondMemory limit: 64 MBAfter the Snow White with her bridegroom had left the house of the seven dwa...
分类:
其他好文 时间:
2015-11-14 16:22:30
阅读次数:
215
QuestionThere are a row ofnhouses, each house can be painted with one of thekcolors. The cost of painting each house with a certain color is different...
分类:
其他好文 时间:
2015-11-09 07:10:41
阅读次数:
288
QuestionThere are a row ofnhouses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a ...
分类:
其他好文 时间:
2015-11-09 07:05:49
阅读次数:
238
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-11-07 21:41:16
阅读次数:
205
House BuildingTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 262144/262144 K (Java/Others)Total Submission(s): 145Accepted Submission(s): 123Prob...
分类:
其他好文 时间:
2015-11-04 23:06:47
阅读次数:
408
题目要求不能够连续抢劫两家房屋。看到这种有限制地选择数组中的一部分,求和。可使用动态规划来完成。...
分类:
其他好文 时间:
2015-11-03 02:04:55
阅读次数:
207