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

DP,动态规划...内附。

Posted by slon at 2011-03-20 09:25:00 on Problem 2287
田鸡和鸡王的马都从强到弱排
dp[i][j]=MAX(dp[i-1][j-1]+g[i][j],dp[i-1][j]+g[i][n-i+j+1]);
d[i][j]:用dp[i,j]表示鸡王出了i匹较强的马和田鸡的j匹较强的马,i-j匹较弱的马比赛之后,田鸡所能够得到的最大盈利。
g[i][j]:第i强的鸡王马和第j强的田鸡马比的盈利(或亏或平或胜利)。

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