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 gouxudong19 at 2010-10-20 15:53:25 on Problem 1636
In Reply To:一点点提示, Posted by:woqno1 at 2010-03-24 07:34:17
> 将人按关系分成若数对,用bfs或并查集
> 然后背包或广搜


bool 型的 dp[i,j]表示第一组的i人和第二组的j人交换是否可行
最后搜索dp[i,i] 最大的 i 就是答案

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