This commit is contained in:
Zengtudor 2024-09-19 11:25:26 +08:00
parent a926d878d1
commit 513f21c1cf
2 changed files with 8 additions and 7 deletions

View File

@ -5,14 +5,15 @@ int a[101];
int sum[101]; // prefix sum
int f[101][101];
/*
1.dp[i][j]
1n堆石子合成一堆
dp[i][j]i堆到第j堆石子合成一堆
2.dp[i][j]
i-j之间选一个中间值k
dp[i][j]=dp[i][k]+dp[k+1][j]+(sum[j]-s[i-1]);
3.dp[0][0],dp[0][j],dp[i][0],dp[i][j],dp[i][i]
1.dp[i][j]
1n堆石子合成一堆
dp[i][j]i堆到第j堆石子合成一堆
2.dp[i][j]
i-j之间选一个中间值k
dp[i][j] = dp[i][k] + dp[k+1][j] + ( sum[j] - s[i-1] );
3.dp[0][0],dp[0][j],dp[i][0],dp[i][j],dp[i][i]
*/

BIN
out.txt

Binary file not shown.