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:为什么这题把DP数组初始化为负无穷就会WA

Posted by harrymew at 2012-05-21 22:14:54 on Problem 3624
In Reply To:为什么这题把DP数组初始化为负无穷就会WA Posted by:920192460 at 2012-04-22 09:45:07
> 除了dp[0]=0 其余初始化为负无穷就WA 求解
因为背包可以不装满的,初始化负无穷,就要求背包一定要装满才行,0,就可以不装满。

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