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

用DP吧

Posted by alpc56 at 2009-10-12 00:47:08 on Problem 2680
int i,j;
p[0].a1 = 1;
p[0].a0 = 0;
p[0].a01 = 0;
p[0].a10 = 0;
p[0].a00 = 0;
p[0].a11 = 0;
for(i=1;i<1001;i++)
{
	p[i].a1 = p[i-1].a0+p[i-1].a1;
	p[i].a0 = p[i-1].a0+p[i-1].a1;
	p[i].a10 = p[i-1].a0+p[i-1].a11;
	p[i].a01 = p[i-1].a1+p[i-1].a00;
	p[i].a00 = p[i-1].a01;
	p[i].a11 = p[i-1].a10;
}
算什么都可以  ^_6

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