码迷,mamicode.com
首页 >  
搜索关键字:robber    ( 302个结果
【easy】198. House Robber
一个极其简单的动态规划。 ...
分类:其他好文   时间:2018-02-19 12:19:01    阅读次数:99
337. House Robber III
小偷第三题 list的add(index,val)方法相当于插入,要修改某个地方用set,这和map的put不一样,map的put之后就直接覆盖了。 ...
分类:其他好文   时间:2018-01-28 21:53:34    阅读次数:148
198. House Robber(动态规划)
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 ...
分类:其他好文   时间:2018-01-21 11:07:10    阅读次数:127
198. House Robber
#week7 You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stop ...
分类:其他好文   时间:2018-01-13 11:18:10    阅读次数:190
LeetCode with Python -> Dynamic Programming
198. House Robber You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only cons ...
分类:编程语言   时间:2018-01-08 22:30:02    阅读次数:200
337. House Robber III
The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the "root." Besides the root, each hou ...
分类:其他好文   时间:2017-12-07 22:42:47    阅读次数:245
House Robber
题目的意思很简单,就是每次只能取非连续的两个值 用分治法在nums比较大时会超时 仔细思考一下发现有重复子问题,设v中存着最优的解,则最优解为 max(v[n][0],v[n][1]),v[n][0]表示不取第n个数时的最优解,v[n][1]表示取第n个数时的最优解,同时满足最优子结构性质,如下所示 ...
分类:其他好文   时间:2017-11-30 19:22:24    阅读次数:143
198. House Robber
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 ...
分类:其他好文   时间:2017-10-18 18:27:15    阅读次数:121
hdu-2955 Robberies
The aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because they become t ...
分类:其他好文   时间:2017-08-21 00:06:57    阅读次数:233
213. House Robber II
这道题是之前那道House Robber 打家劫舍的拓展,现在房子排成了一个圆圈,则如果抢了第一家,就不能抢最后一家,因为首尾相连了,所以第一家和最后一家只能抢其中的一家,或者都不抢,那我们这里变通一下,如果我们把第一家和最后一家分别去掉,各算一遍能抢的最大值,然后比较两个值取其中较大的一个即为所求 ...
分类:其他好文   时间:2017-08-04 13:52:38    阅读次数:116
302条   上一页 1 ... 5 6 7 8 9 ... 31 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!