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 suncongbo at 2018-09-30 16:52:22 on Problem 1141
我看到网上题解的思路都是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:
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