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 yong730 at 2007-05-13 17:15:24 on Problem 3230
我的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:
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