摘要:
单调队列优化DP//状态转移方程:f[i][j]=min(f[i-k][j-1]+(s[i]-s[i-p])*g[j])
#include <iostream>
#include <cstdio>
#include <cstring>
#define LL long long
using namespace std;
const LL inf=0x3f3f3f3f3f3f3f3f;
LL x[10000+10],s[10000+10],q[10000+10];
LL g[200+10];
LL f[2][10000+10];
int n,k,a,b;
int 阅读全文
posted @ 2013-04-06 13:24
LJ_COME!!!!!
阅读(180)
评论(0)
推荐(0)

浙公网安备 33010602011771号