摘要:
还是四边形不等式的题目。//By YY_More#include<cstdio>int x[1001],sum[1001],n,m,temp,s[1001][1001],f[1001][1001];inline int cal(int a,int b){ return x[b]-x[a-1]-sum[a-1]*(sum[b]-sum[a-1]);} int main(){ while (~scanf("%d%d",&n,&m)){ if (n==0) break; sum[0]=0;x[0]=0; for(int i=1;i<=n;i++) 阅读全文