Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:一点点提示, 最后背包的一种通过想法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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator