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 |
简单递推方程凑数,比如十位数,则看左边五位,对于从0到99999每一个数字有多少种凑法,则右边一样,根据乘法原理,总的凑法则是一边凑法的平方了。 d[i][j]=0; d[i][j]+=d[i-k][j-1] 0<k<10 i>=k i表示要凑的数,j表示凑这个数用的位数 然后所有的累加就是结果 Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator