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:终于到70了!!!!

Posted by Lerence1201 at 2014-02-11 11:08:45 on Problem 3274
In Reply To:终于到70了!!!! Posted by:sxd31415926 at 2011-08-01 16:51:45
> 原来此题是哈希,一开始没看出来。
> 发现一条性质:如果一段区间是平衡的,那么这段区间的所有数xor一下结果是0 或 2^k-1,这样就可以预处理出s[i],表示a[0] xor a[1] xor a[2] xor ... xor a[i]。要看[x,y]是否平衡,只需看s[y] xor s[x-1]是否等于0或2^k-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