摘要: 斜率dp#include#include#include#include#define maxn 10005#define maxm 5005using namespace std;int dp[maxn][maxm];int q[maxn*10];int num[maxn];bool check(int j,int tail,int i){ int yk=dp[q[tail-1]][j-1]+num[q[tail-1]+1]*num[q[tail-1]+1]; int yj=dp[q[tail]][j-1]+num[q[tail]+1]*num[q[tail]+1]; in... 阅读全文
posted @ 2014-03-12 17:13 Yours1103 阅读(116) 评论(0) 推荐(0) 编辑