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 tzkq at 2010-03-01 04:34:46 on Problem 1564
In Reply To:很黄很暴力的做法 Posted by:cangratul at 2009-05-24 17:21:44
我看了一个大概, 其原理仍是枚举, 效率为 O(2^n);

只不过枚举的手段相当创新,一般来说用递归来枚举是最简单的, 而作者用的是2进制的原理。

把从0到2^n-1中的每个数作为一个序列状态,通过bit操作映射到真正的序列, 再进行比较判断。

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