Online Judge | Problem Set | Authors | Online Contests | User | ||||||
---|---|---|---|---|---|---|---|---|---|---|
Web Board Home Page F.A.Qs Statistical Charts | Current Contest Past Contests Scheduled Contests Award Contest |
Re:此题DP做法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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator