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,可以发现2个合体有4中,后面就是技术是2种,偶数有3种

Posted by Jack_whj at 2014-01-22 21:52:53 on Problem 3797 and last updated at 2014-01-22 21:54:54
for(int i=3;i<=1000;i++){
			ai[i]=ai[i-1]+ai[i-2]*4;int t=2;
			for(int j=i-3;j>=1;j--){
				ai[i]=ai[i]+ai[j]*t;
				if(t==2){
					t=3;
				}else{
					t=2;
				}
			}
			ai[i]=ai[i]+t;
		
		}

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