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:01背包部分由缺陷

Posted by 422803902 at 2013-01-30 22:10:08 on Problem 1014
In Reply To:Re:01背包部分由缺陷 Posted by:422803902 at 2013-01-30 22:08:18
> 我觉得这个有缺陷,就是在01背包的那一部分。如果像你这样分解物品的话可能会有错:比如某物品有6个,你有可能会使用了7个;而如果某物品有2个,你只会使用1个。
> 应该分解成1、2……2^(k-1)、n[i]-2^k,其中n[i]-2^k>=0.这样使用的物品数不会超过n[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