| ||||||||||
| 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 | |||||||||
斜着走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: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator