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:这题怎么剪枝好?我在POJ这里5XXMS,在ZOJ TLE

Posted by KosonLau at 2008-12-04 15:48:58 on Problem 2531
In Reply To:这题怎么剪枝好?我在POJ这里5XXMS,在ZOJ TLE Posted by:bakey at 2005-08-19 11:59:50
用一个int存储状态,比如有3个点,则100表示将第一个点归为一个子图,则顶点划分为(1),(2,3)两个子图,
另外,此状态与011是等价的,011表示将第二第三个点归为一个子图,即(1),(2,3),
使用bfs能过.,但我使用dfs TLE...

不过看了下面的discuss才知道可以使用随机化方法解决此问题,学习了.第一次用...

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