p275专题

uva 11400 lrj-P275 动态规划

题意: 见刘汝佳入门书籍 P275 dp[i]=min(dp[i],dp[j-1]+(sum[i]-sum[j-1])*a[i].c+a[i].k);题解: 见刘汝佳入门书籍 P275 #include<stdio.h>#include<string.h>#include<algorithm>using namespace std;int dp[1010]