回複:三個特例,包括(難度-低)。望起拋磚引玉之功效。

來源: 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.