摘要:
思路:dp[i]=min{dp[j]+max(num[j+1]...num[i])},其中sum[i]-sum[j]#include#include#include#include#include#include#include#include#include#include#define pb push_back#define mp make_pair#define Maxn 100010#define Maxm 200010#define Y 1100#define LL __int64#define Abs(x) ((x)>0?(x):(-x))#define lson(x) (x 阅读全文