正文
增加 2 行删除 2 行
2 行未改动34567891011258 行未改动全部展开2702712722732742752762772789 行未改动2 行未改动主要是写心得,而且可能是我在luogu的第一篇&最后一篇题解了加强版可以在LOJ上找到对于 $100\%$ 的数据,$n,m\le 10^5$,$k\le5\times10^6$,$D_i\le 1000$。-----------------# 开题258 行未改动全部展开pos=glf(1,now.l+1,now.r).maxpos;if(now.l<=pos-1)q.push(segment(now.l,pos-1,sum[pos]-sum[now.l],now.vis));if(pos<=now.r)q.push(segment(pos,now.r,sum[now.r+1]-sum[pos],pos));}}}for(int i=1;i<n;i++)pre[i+1]=pre[i]+d[i];ll ans=-T;9 行未改动2 行未改动34567891011258 行未改动全部展开2702712722732742752762772789 行未改动2 行未改动主要是写心得,而且可能是我在luogu的第一篇&最后一篇题解了加强版可以在LOJ上找到对于 $100\%$ 的数据,$n,m\le 10^5$,$k\le5\times10^6$,$D_i\le 1000$。-----------------# 开题258 行未改动全部展开pos=glf(1,now.l+1,now.r).maxpos;if(now.l<=pos-1)q.push(segment(now.l,pos-1,sum[pos]-sum[now.l],now.vis));if(pos<=now.r)q.push(segment(pos,now.r,sum[now.r+1]-sum[pos],pos));}}}for(int i=1;i<n;i++)pre[i+1]=pre[i]+d[i];ll ans=-T;9 行未改动