In this problem, house are arranged in a circle, robber should not invade into two adjacent houses. Compared to the former problem, we need to conside
分类:
其他好文 时间:
2016-02-29 09:18:13
阅读次数:
152
本文来源于我在InfoQ中文站翻译的文章,原文地址是:http://www.infoq.com/cn/news/2016/02/gulp-grunt-npm-scripts-part1Cory House是“Building Applications with React and Flux”与“Clean Code: Writing Code for Humans”的作者,同时也是Pluralsi...
分类:
其他好文 时间:
2016-02-24 09:42:05
阅读次数:
263
树上每个元素有一个p,元素之间有距离d,计算一个元素u,使得sigma(d(i,u)*pi)最小。 两次dfs,第一次计算本节点以下的sigma(),第二次利用sump求解出ans。 1 #include <cstdio> 2 #include <algorithm> 3 #include <cst
分类:
其他好文 时间:
2016-02-21 18:24:22
阅读次数:
204
坚持!坚持!坚持~! stay-at-home mom 全职妈妈 keep the house in order 让家里井井有条 My mom was a stay-at-home mom when I was growing up.She worked around the clock to ke
分类:
其他好文 时间:
2016-02-16 08:43:51
阅读次数:
152
// 获取已选择的option的value值 var houseTypeCode = $('#HOUSE_TYPE option:selected').val(); //$('#id option:selected').text() 获取已选择的option 的文本值 //利用j...
分类:
其他好文 时间:
2016-01-22 17:59:51
阅读次数:
130
题目链接:space=1&num=1725" target="_blank">http://acm.timus.ru/problem.aspx?space=1&num=1725Every fall, all movies are shown to a full house at one of the...
分类:
其他好文 时间:
2016-01-13 15:51:20
阅读次数:
147
There 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. You ha...
分类:
其他好文 时间:
2016-01-13 02:03:22
阅读次数:
197
用DP思维很好解决 注意终止条件 这里添加了一个数组 length = nums.length + 1;代码:public class Solution { public int rob(int[] nums) { int[] money = new int[nums.lengt...
分类:
其他好文 时间:
2016-01-10 08:12:04
阅读次数:
206
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 certain ...
分类:
其他好文 时间:
2016-01-02 08:41:24
阅读次数:
155