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

简单的一道dp题,一看就知道最多一对夫妻单独住,看下面的解释

Posted by HH_YT at 2012-09-24 23:22:36 on Problem 2901
比如男 5 女 3 夫妻 2
那么可以有两组 5 3
或者 5 2 2
有人说为什么不能有4 1 2 2呢,其实没必要,应为对于第二组的男人组5个人就可以分成4 1两组的情况,避免的重复
优化成这样了dp就减了一层,随便过

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