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:枚举也能1AC!

Posted by ljh3131197 at 2010-03-16 22:23:12 on Problem 2965
In Reply To:枚举也能1AC! Posted by:xiao_si at 2009-09-12 01:57:42
> 首先应该明白两点:
> 1 不论翻转执行的先后序列如何,结果都一样。
> 2 每一个点(i,j)最多做一次翻转。(由1不难得到)
> 所以结果可以转化为一个只包含0、1的十六位字符串,枚举所有的字符串逐个检验,取包含1最少的串(若果1代表翻转的话)。
> 
> 枚举 一种实现为 for(int i=1;i<(1<<16);++i)Test(i)

非常感激  看了你的说明

经多次努力  终于AC了  虽然是860MS

这是我第一个在PKU提交的程序啊  真的很感激

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