作者boblind (the only way is down)
站内Prob_Solve
标题Re: [问题] GCJ Practice Problems Shopping Plan
时间Tue Jul 22 22:19:11 2008
※ 引述《Lucemia (生の直感、死の予感)》之铭言:
: google code jam 的 shopping plan 有人会解吗?
: 这题想了一晚还是不会解 ~"~
: 看了前几名的解法,感觉好像是用暴力法解的?
: (ex: msg555)
recursive with memo
可以看成是 DP[bit mask of 已买的item][目前位置][是否於此买了perish item]
这题正向 DP 的式子比较难写,recursive 又不会过深导致 stack overflow
所以用recursive是比较好解的
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 59.105.167.12