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空间复杂度确实高了。statu中居然有16k的,肯定有好方法。先说一下my solve。 dp[i][j][k],前i个,选j个黑的,k个白的。 dp[i][j][k] = max(dp[i-1][j][k],dp[i-1][j-1][k]+A[i][0], dp[i][j][k-1]+A[i][1]); Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator