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

多重背包思路可以过么?

Posted by danieltest at 2009-12-01 16:41:06 on Problem 1014
共6个物品,价值和重量相等,都等于1,或者2,或者3...6

sum = sum + i*p[i]

然后求容量为sum/2的背包的解,如果f[sum/2] = sum/2; 就可以divide

这个思路有错么?

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