回复:三个特例,包括(难度-低)。望起抛砖引玉之功效。

回答: A B 两人分蛋糕 (难度适中)guest0072010-07-06 06:21:01

Let f(m,n) is B's cakes. We can get following recursive
function:
f(m,n)=1/2(1+f(m-1,n)+f(m-1,n-1))
f(m,m)=m/2,f(1,0)=0.
Most recursive
functions can't be simplified,but this can...if you have time.

所有跟帖: 

i think you are right. -皆兄弟也- 给 皆兄弟也 发送悄悄话 皆兄弟也 的博客首页 (233 bytes) () 07/13/2010 postreply 10:05:44

Jin's answer is good enough -guest007- 给 guest007 发送悄悄话 (458 bytes) () 07/13/2010 postreply 12:57:50

回复:Jin's answer is good enough -jinjing- 给 jinjing 发送悄悄话 (7 bytes) () 07/15/2010 postreply 19:41:39

回复:Jin's answer is good enough -一川烟雨- 给 一川烟雨 发送悄悄话 (73 bytes) () 07/16/2010 postreply 14:57:24

之后。A先切,然后B决定是否使用优先权。使用,则拿大块,但失去一次优先权。 -皆兄弟也- 给 皆兄弟也 发送悄悄话 皆兄弟也 的博客首页 (0 bytes) () 07/16/2010 postreply 19:50:22

请您先登陆,再发跟帖!