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:第一次贴代码。。

Posted by ttzychen at 2012-12-06 16:01:14 on Problem 2533
In Reply To:Re:第一次贴代码。。 Posted by:2010201307 at 2012-03-24 00:04:18
> 为什么要加一个&&dp[i]<dp[j]呢?想不明白……
举个例子,1 2 3
如果没有dp[i]<=dp[j]
则dp[0]=1;dp[1]=dp[0]+1=2;dp[2]=(dp[0]+1)+(dp[1]+1)=5

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