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 Silgon at 2009-02-08 00:01:04 on Problem 2680
In Reply To:规律 Posted by:lshguang89 at 2007-11-09 16:45:22
> n=2*m 时  结果为 (2^(n-1)-2)/3 +1
> n=2*m+1时 结果为 (2^(n-1)-1) /3

可以这样吗?  
用f[n][0]表示n中00的对数,用f[n][1]表示n中1的个数   
当n=0时,f[n][0] = 0, f[n][1] = 1;
当n=1时, f[n][0] = 0, f[n][1] = 1;
当n>=2时,f[n][0] = f[n-2][0]+f[n-2][1];
         f[n][1] = 2 * f[n][1];
则f[n][0]为所求解。

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