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

hint again

Posted by yinyueemo at 2013-01-14 15:09:36 on Problem 3790
枚举中间的数+dp
dp[0] = dp[1] = 1;
for(int i=2;i<=1000;i++)
{
	dp[i] = 0;
	if(i%2==0) dp[i]+=dp[i/2];
	for(int j=1;j<=i;j++)
	{
		int temp = i - j;
		if(temp%2==0) dp[i] += dp[temp/2];
	}
}

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