Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
我来解释一下In Reply To:Re:不用循环吧 这样就好了 Posted by:first at 2006-03-09 17:17:03 f(m, n) = f(m-n, n) + f(m, n-1) f(m, n): 把m个苹果放到n个盘子中的方法数 f(m, n-1): 把m个苹果放到n-1个盘子中的方法数(其中至少有一个空盘子) f(m-n, n): 把m个苹果放到n个盘子中,而且每个盘子中都有苹果(先拿n个出来,等m-n个放好了,然后每个盘子放一个) Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator