There are a row of n houses, each house can be painted with one of the k colors. The cost of painting each house with a certain color is different. Yo...
分类:
其他好文 时间:
2015-12-23 14:30:27
阅读次数:
393
SELECT TOP 5 * FROM hos_house WHERE HMID NOT IN( SELECT TOP 5 HMID FROM hos_house WHERE PRICE>2500 ORDER BY PRICE) AND PRICE>2500 ORDER BY PRICE---...
分类:
数据库 时间:
2015-12-15 01:03:51
阅读次数:
174
这题,是不能连续抢两间相邻的店铺。我不知道是不是一个环,姑且算作不是一个环。 如果你已经来到了第n间店铺,那么你有两个选择。 1.抢:sum[n] = sum[n - 2] +n.value 。第n - 1不能抢 2.不抢:你的总收益来到前面一家店的收益总和sum[n] =sum[n - ...
分类:
其他好文 时间:
2015-12-14 18:28:58
阅读次数:
116
题目:There 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 certa...
分类:
其他好文 时间:
2015-12-03 07:12:06
阅读次数:
127
public class Solution { public int minCostII(int[][] costs) { int n = costs.length; if (n == 0) { return 0; } ...
分类:
其他好文 时间:
2015-12-01 08:26:19
阅读次数:
112
接着之前的[css]我要用css画幅画(四), 这次我给小明和静静增加了对话,用了简单的动画效果。github:https://github.com/bee0060/Css-Paint, 完整代码在pages/sun-house-4.html和相关的css中可以找到demo:http://bee00...
分类:
Web程序 时间:
2015-11-27 17:31:16
阅读次数:
282
挺有意思的动态规划题目,只和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