_(:3」∠)_四边形优化dp[i][j]:第i个点和第j个点合并的最小花费cost(i,j,k):第i和第j个点通过第k个点合并所需要的花费容易写出:dp[i][j]=min{dp[i][k]+dp[k+1][j]+cost(i,j,k)}易证cost函数为凸然后四边形优化之#include#include#include#include#include#include#include#include#include#define BUG printf("hehe\n")#define INF 0x3f3f3f3f#define ll long longusing nam Read More
posted @ 2014-04-06 01:17 MoriMiya Views(153) Comments(0) Diggs(0) Edit