Skip to content

Commit

Permalink
Update 01.Linear-DP-01.md
Browse files Browse the repository at this point in the history
  • Loading branch information
itcharge committed Sep 19, 2023
1 parent f65dbef commit 9de5b07
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ class Solution:

###### 3. 状态转移方程

以 $arr[j]$、$arr[k]$ 结尾的斐波那契式子序列的最大长度 = 满足 $arr[i] + arr[j] = arr[k]$ 条件下,以 $arr[i]$、$arr[j]$ 结尾的斐波那契式子序列的最大长度加 $1$。即状态转移方程为:$dp[j][k] = max_{(A[i] + A[j] = A[k]i < j < k)}(dp[i][j] + 1)$。
以 $arr[j]$、$arr[k]$ 结尾的斐波那契式子序列的最大长度 = 满足 $arr[i] + arr[j] = arr[k]$ 条件下,以 $arr[i]$、$arr[j]$ 结尾的斐波那契式子序列的最大长度加 $1$。即状态转移方程为:$dp[j][k] = max_{(A[i] + A[j] = A[k], \quad i < j < k)}(dp[i][j] + 1)$。

###### 4. 初始条件

Expand Down

0 comments on commit 9de5b07

Please sign in to comment.