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[i][j]=min(dp[i][k]+dp[k+1][j]), 若a[i]与a[j]匹配则dp[i][j]=min(dp[i][j],dp[i+1][j-1]) 我有一个不一样的思路:考虑左端点i,找到i+1..j内,与i相匹配的一个k, dp[i][j]=min(dp[i][k-1]+dp[k+1][j]) 请问这样是否可以啊?请巨佬们帮助一下,谢谢! Followed by: Post your reply here: |
All Rights Reserved 2003-2013 Ying Fuchen,Xu Pengcheng,Xie Di
Any problem, Please Contact Administrator