摘要:
状态转移方程如下: 当i > j时,dp[i,j]= 0。 当i = j时,dp[i,j] = 1。 当i < j并且str[i] == str[j]时,dp[i][j] = dp[i+1][j-1]+2; 当i < j并且str[i] ≠ str[j]时,dp[i][j] = max(dp[i][ 阅读全文
摘要:
Description We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a regular brackets sequence, if s is a 阅读全文