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 |
Re:dpIn Reply To:dp Posted by:Sempr at 2007-01-27 22:11:29 > dp[i+1][j] = Max(dp[i+1][j], dp[i][j]+(i+1)*v[k]); > dp[i+1][j+1] = Max(dp[i+1][j+1], dp[i][j]+(i+1)*v[N-1-j]); 偶瞎搞了一个,竟然ac了。。晕了 f[i][j] = max(f[i - 1][j] + data[i - 1] * (N + i - j - 1), f[i][j + 1] + data[j + 1] * (N + i - j - 1)); 特例 f[i][i] + data[i] * N Followed by:
Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator