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:WA了好几次……终于AC了……给一组数据

Posted by 1guangnian at 2011-07-20 16:47:16 on Problem 1036
In Reply To:WA了好几次……终于AC了……给一组数据 Posted by:dashashi at 2010-05-11 01:19:56
5 11 10

1 1 10 10 10

1 2 4 8 16

2 3 9 10 11
应该改成这样
一开始dp初始化为0了,应该为-1,表示这个状态还不可达(最小收益可以为0)
如果dp[i]可以dp[j]转移,但dp[j]不可达的话,初始化为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