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

来源: 2010-07-12 17:57:50 [旧帖] [给我悄悄话] 本文已被阅读:

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.