| ||||||||||
| 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:请问:怎么递归啊?In Reply To:请问:怎么递归啊? Posted by:c0400330001 at 2004-05-29 22:21:00 x1+x2+x3+....xn=m,x1>=x2>=....>=xn
本题等价于求解上述方程的解的个数,令fun[k][n][m]表示x1=k时的个数,则
for(j=0;j<=m-k&&j<=k;j++)
{
fun[k][n][m]+=fun[j][n-1][m-k];
}
Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator