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 first at 2006-03-09 17:17:03 on Problem 1664
In Reply To:Re:请问:怎么递归啊? Posted by:ggg at 2004-06-03 10:14:49
int PlaceApple(int m, int  n)
{
	if(m < 0)
		return 0;
	if(m  == 0)
		return 1;
	if(n == 0)
		return 1;
	return PlaceApple(m - n, n) + PlaceApple(m, n - 1);
}

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