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

斜着走

Posted by Iamjw at 2006-08-13 20:30:16 on Problem 2964
In Reply To:想不到三维的DP如何表示状态,能解释一下吗? Posted by:nuanran at 2006-08-13 19:40:40
tot[i][j][k]
表示两条路在同时在第i条斜线上,且第一条路横坐标为j,第二条路横坐标为k时的最大值。这样比较 tot[i-1][j-1][k], 
               tot[i-1][j-1][k-1],
               tot[i-1][j][k-1],
               tot[i-1][j][k]
即可
最后结果为tot[w+h][h][h]

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