
树形dp+记忆化搜索
文章平均质量分 74
cloudy_happy
像我这样优秀的人,不该平凡过一生
展开
-
hdu1520 Anniversary party 树形dp
Anniversary partyTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 17079 Accepted Submission(s): 6451 Problem DescriptionThere is goi...原创 2018-08-10 22:41:18 · 169 阅读 · 0 评论 -
hdu1078 FatMouse and Cheese 记忆化搜索
FatMouse and CheeseFatMouse has stored some cheese in a city. The city can be considered as a square grid of dimension n: each grid location is labelled (p,q) where 0 <= p < n and 0 <= q &l...原创 2018-08-10 22:47:15 · 164 阅读 · 0 评论 -
Lightoj1006 Hex-a-bonacci dp
Hex-a-bonacci Given a code (not optimized), and necessary inputs, you have to find the output of the code for the inputs. The code is as follows:int a, b, c, d, e, f;int fn( int n ) { if( n =...原创 2018-08-10 22:52:58 · 201 阅读 · 0 评论 -
poj1088 滑雪 记忆化搜索
滑雪 Michael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长的滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 516 17 18 19 615 24 25 20 714 23 22 21 8...原创 2018-08-10 22:57:57 · 127 阅读 · 0 评论 -
poj1579 Function Run Fun 记忆化搜索
Function Run Fun We all love recursion! Don't we? Consider a three-parameter recursive function w(a, b, c): if a <= 0 or b <= 0 or c <= 0, then w(a, b, c) returns: 1 if a > 20 or b...原创 2018-08-10 23:01:42 · 154 阅读 · 0 评论