动态规划
MU__LE
这个作者很懒,什么都没留下…
展开
-
最长下降子序列
A group of researchers are designing an experiment to test the IQ of a monkey. They will hang a banana at the roof of a building, and at the mean time, provide the monkey with some blocks. If the monk...原创 2018-08-10 16:20:13 · 439 阅读 · 0 评论 -
记忆化搜索
Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 1...原创 2018-08-10 17:05:21 · 136 阅读 · 0 评论 -
数字三角形
7 3 8 8 1 0 2 7 4 4 4 5 2 6 5 (Figure 1) Figure 1 shows a number triangle. Write a program that calculates the highest sum of numbers passed on a route that starts at the top an...原创 2018-07-27 19:32:37 · 179 阅读 · 0 评论 -
LITTLE SHOP OF FLOWERS
You want to arrange the window of your flower shop in a most pleasant way. You have F bunches of flowers, each being of a different kind, and at least as many vases ordered in a row. The vases are glu...原创 2018-08-08 14:06:11 · 276 阅读 · 0 评论 -
钉子和小球
有一个三角形木板,竖直立放,上面钉着n(n+1)/2颗钉子,还有(n+1)个格子(当n=5时如图1)。每颗钉子和周围的钉子的距离都等于d,每个格子的宽度也都等于d,且除了最左端和最右端的格子外每个格子都正对着最下面一排钉子的间隙。 让一个直径略小于d的小球中心正对着最上面的钉子在板上自由滚落,小球每碰到一个钉子都可能落向左边或右边(概率各1/2),且球的中心还会正对着下一颗将要碰上的钉子。...原创 2018-08-08 15:55:38 · 544 阅读 · 0 评论 -
完全背包
John never knew he had a grand-uncle, until he received the notary's letter. He learned that his late grand-uncle had gathered a lot of money, somewhere in South-America, and that John was the only...原创 2018-08-08 19:41:51 · 136 阅读 · 0 评论 -
01背包
Bessie has gone to the mall's jewelry store and spies a charm bracelet. Of course, she'd like to fill it with the best charms possible from the N (1 ≤ N ≤ 3,402) available charms. Each charm i in the...原创 2018-08-08 19:56:55 · 165 阅读 · 0 评论 -
Jam's balance
Jim has a balance and N weights. (1≤N≤20)(1≤N≤20) The balance can only tell whether things on different side are the same weight. Weights can be put on left side or right side arbitrarily. Please t...原创 2018-08-22 12:13:30 · 343 阅读 · 0 评论