A -RobberiesTime Limit:1000MSMemory Limit:32768KB64bit IO Format:%I64d & %I64uSubmitStatusPracticeHDU 2955DescriptionThe aspiring Roy the Robber has s...
分类:
其他好文 时间:
2015-04-13 22:28:01
阅读次数:
536
Fun House
Time Limit: 1000MS Memory limit: 65536K
题目描述
American Carnival Makers Inc. (ACM) has a long history of designing rides and attractions. One of their more popular attract...
分类:
其他好文 时间:
2015-04-13 11:02:32
阅读次数:
149
我这个弱B一开始就认为对于一个数, 对半分肯定比其他的分配方案好,然后最终也没过对半分不一定是最好的分配方案,比如, 9 可能分成3个3比对半分好真不知道那些大牛是怎么思考问题的,我看了第一的代码,他枚举最终状态的最大值, 他是怎么思考问题的呢?下面这个我改的蔡的暴力代码, 加上了枚举每一种分法,目...
分类:
其他好文 时间:
2015-04-13 01:42:19
阅读次数:
219
https://leetcode.com/problems/house-robber/
题目设计了一个抢劫犯的情景,其实就是求数组中不相邻数据进行组合得到的最大值
举一个例子
假设数据: 8 3 6 15 4 9 7 10
那么首先可能选取 8 , 3
每一个数字的选取都是根据他的前两个数字,前三个数字得到的最大值进行选择,等到6的时候考虑前面只能和8组合 8,3,14
到数字15,...
分类:
编程语言 时间:
2015-04-13 00:28:01
阅读次数:
164
Problem
At the Infinite House of Pancakes, there are only finitely many pancakes, but there are infinitely many diners who would be willing to eat them! When the restaurant opens for breakfast, among...
分类:
其他好文 时间:
2015-04-12 16:19:03
阅读次数:
120
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-04-12 06:42:08
阅读次数:
113
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-04-11 23:49:01
阅读次数:
156
Problem
At the Infinite House of Pancakes, there are only finitely many pancakes, but there are infinitely many diners who would be willing to eat them! When the restaurant opens for breakfast, among...
分类:
其他好文 时间:
2015-04-11 20:53:37
阅读次数:
134
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 you from robbing each of them is that adjacent house...
分类:
其他好文 时间:
2015-04-11 18:01:53
阅读次数:
104
/*题意:有一排房子,每个房子里有一些钱,每两个相连房子只能取一个,问取得的最大的钱数是多少? */class Solution {public: int rob(vector &num) { int len = num.size(),num1 = 0,num2 = 0,temp...
分类:
其他好文 时间:
2015-04-11 16:03:16
阅读次数:
152