#include<cstdio> #include<ctime> #include<cstdlib> #include<iostream> #define M 3000009 using namespace std; struct shu { int l,r,sum1,zhi,dui,sum2; }a[M]; int n,root[M],size,ans,b[M],m; void you(int &a1) { int t=a[a1].l; a[a1]
DP + 单调队列优化 + 平衡树 好题 Description Given an integer sequence { an } of length N, you are to cut the sequence into several parts every one of which is a consecutive subsequence of the original sequence. Every part must satisfy that the sum of the intege