Don't let the past steal your present. 别让过去悄悄偷走了我们的当下。 We take what we can get and make the best of it. 我们取我们所能取,好好地享用。 From The House on Mango Street ...
分类:
其他好文 时间:
2017-12-01 15:15:10
阅读次数:
157
题目的意思很简单,就是每次只能取非连续的两个值 用分治法在nums比较大时会超时 仔细思考一下发现有重复子问题,设v中存着最优的解,则最优解为 max(v[n][0],v[n][1]),v[n][0]表示不取第n个数时的最优解,v[n][1]表示取第n个数时的最优解,同时满足最优子结构性质,如下所示 ...
分类:
其他好文 时间:
2017-11-30 19:22:24
阅读次数:
143
Time Complexity: O(N*K), Space Complexity: O(1) The idea is similar to the problem Paint House I, for each house and each color, the minimum cost of p ...
分类:
其他好文 时间:
2017-11-30 13:37:47
阅读次数:
184
Face Recognition for the Happy House Welcome to the first assignment of week 4! Here you will build a face recognition system. Many of the ideas prese ...
分类:
移动开发 时间:
2017-11-27 16:44:30
阅读次数:
216
最近接触了堆溢出的pwn,对网上解释绕过safe unlink的方法(各种House of XXX)的解释感觉不够简洁精要,故作此总结记录。关键点可以只看红色加粗部分。 首先,堆溢出最好的利用方法是能覆盖关键变量,例如函数指针,但这样的场景可遇不可求。 堆溢出的unlink利用方法是通用的利用方法, ...
分类:
其他好文 时间:
2017-11-26 23:58:43
阅读次数:
458
shopping = [['house',1000000],['book',50],['iphone',3000]] qian = input('请输入你的钱:') shoppingcar = [] if qian.isdigit(): qian = int(qian) while True: fo... ...
分类:
其他好文 时间:
2017-11-24 22:47:53
阅读次数:
134
P2873 [USACO07DEC]泥水坑Mud Puddles P2873 [USACO07DEC]泥水坑Mud Puddles P2873 [USACO07DEC]泥水坑Mud Puddles 题目描述 Farmer John is leaving his house promptly at 6 ...
分类:
其他好文 时间:
2017-11-19 15:34:57
阅读次数:
141
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 ...
分类:
其他好文 时间:
2017-11-16 11:54:06
阅读次数:
170
There are a row of n houses, each house can be painted with one of the three colors: red, blue or green. The cost of painting each house with a certai ...
分类:
其他好文 时间:
2017-11-16 11:42:59
阅读次数:
96
House Man Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 2056 Accepted Submission(s): 811 Probl ...
分类:
其他好文 时间:
2017-11-01 16:31:15
阅读次数:
226