摘要: 简单DP,状态转移方程如下:res[i][j]=min(res[i][j],res[k][j-1]+fact(k+1,i)) (1<=j<i && j<=m, 1<=i<=n, 1<=k<i);fact(i,j)表示从i到j的系数。#include<iostream>#include<cstdio>#include<cstring>using namespace std;#define MAX 1234567890int res[501][501],fact[501][501],horse[501]; 阅读全文
posted @ 2012-05-06 11:54 书山有路,学海无涯 阅读(194) 评论(0) 推荐(0) 编辑