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做法

Posted by tzkq at 2010-06-10 03:21:10 on Problem 2346
In Reply To:Re:此题DP做法 Posted by:Staryin at 2008-10-19 10:31:49
This is a more proper way.
D(i,j) = Sum(D(i-1,j-k)) (0<=k<=9)

In fact, we can conclude LZ's equation from the one above.

when 10<=j,
D(i,j)=              D(i-1,j-9)+D(i-1,j-8)+...+D(i-1,j-1)+D(i-1,j)
D(i,j-1)=D(i-1,j-10)+D(i-1,j-9)+D(i-1,j-8)+...+D(i-1,j-1)

so,
D(i,j)=D(i,j-1)-D(i-1,j-10)+D(i-1,j)

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