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 |
Re:为什么会AC?????In Reply To:Re:为什么会AC????? Posted by:qdj_dlut_faye at 2008-12-05 00:24:24 if(m>=n) return isItRight( m, n - 1 )+ isItRight( m - n, n ); 当苹果数m大于或者等于盘子数n是,具体分法可以分如下两种情况讨论: 1、有的盘子为空,即分法总数为isItRight( m, n - 1 ); 2、n个盘子都不为空。如何实现,就是先在每个盘子里都放1个苹果。剩下的(m-n)个苹果,就可以随意分,即分法总数为isItRight( m - n, n ) Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator