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

从对称性和奇偶性出发考虑

Posted by foreverlin at 2008-12-14 17:01:15 on Problem 2680
//找规律
//0->10 1->01
// a[2]=1001
// a[3]=0110 1001
// a[4]=1001 0110 0110 1001
// a[5]=0110 1001 1001 0110 1001 0110 0110 1001
//发现n为偶数时,是对称的
// 为奇数时,是前一个相反加上一个前一个(string)
// 那么可以从对称,奇偶来判断连续0
// 当为偶数时,两边与上一个个数是相同的(对称性)
//但是中间还有一个是有两边组成的故 a[n]=a[n-1]*2+1
//为奇数时,两边同偶数时的判断,但是中间一个被破坏了,故为a[n]=2*a[n-1]-1

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