[SPOJ1043,1557,1716,2713,2916,4487,6779,19543]GSS八题系列
[SPOJ1043]GSS1求区间最大字段和,不带修改,线段树维护总和sum,最大子段和gss,最大左子段和lgss,最大右子段和rgss,即可。更新答案:sum=ls->sum+rs->sum;lgss=max(ls->lgss,ls->sum+rs->lgss);rgss=max(rs->rgss,rs->sum+ls->rgss);gss=max(max(ls->gss,rs->gss),l