Online JudgeProblem SetAuthorsOnline ContestsUser
Web Board
Home Page
F.A.Qs
Statistical Charts
Problems
Submit Problem
Online Status
Prob.ID:
Register
Update your info
Authors ranklist
Current Contest
Past Contests
Scheduled Contests
Award Contest
User ID:
Password:
  Register

Re:请问:怎么递归啊?

Posted by ggg at 2004-06-03 10:14:49 on Problem 1664
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:
User ID:
Password:
Title:

Content:

Home Page   Go Back  To top


All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator