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 |
请教牛人一个问题...我的DP超时了,应该怎样优化呢? ans[i][j] 表示第i天在第j个城市 b[i][j] 表示第i天在j的收入 a[i][j] 表示从i到j的费用 ans[i][j] = max{ ans[i-1][k] + b[i][j] - a[k][i] 超时了,应该怎么优化呢? Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator