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

为什么会AC?????

Posted by fantasyorg at 2008-11-19 22:00:39 on Problem 1664
int isItRight(int m,int n)
{
	if ( m <= 1|| n <= 1) 
		return 1;
	if ( m < n ) 
		return isItRight( m, m );
	else 
		return isItRight( m, n - 1 )+ isItRight( m - n, n );
}

return isItRight( m, n - 1 )+ isItRight( m - n, n );
中的isItRight( m,n - 1 )应该指的是小于n堆的总数,
可是isItRight( m - n, n )指的是什么呀,
难道是
m个苹果被分为n堆(不包括小于n堆的) 等于 先在n个箱子中各放一个,
然后再把剩下的苹果分为小于或等于n堆
?????????????????
是这样吗? 

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