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 liuyuyangfoam at 2005-12-25 11:41:48 on Problem 2440
In Reply To:能不能详细说一下如何找到规律的???谢谢 Posted by:zsl2007 at 2005-12-24 22:57:36
比如L=4,
0000 1000
0001 1001
0010 1010
0011 1011
0100 1100
0101 1101
0110 1110
0111 1111
左边一半有A(n-1)个对的,右边100后面接A(n-3),1100后面接A(n-4),至少很显然这些都是对的,也就是不会被感染的基因。
然后证明其他的一定包含111,101.这也很显然。
不过我是看了大家的结论才推的,不好意思。
mod 2005的话一定是有循环节的,2005这个数字不大,可以用计算极算一下这个训环节在那里,毕竟只要检查是否有连续4个重复,就算KMP用N次的话也不过就是O(N^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