给定长度为n的数组a,若在p1,p2,...,p[m]位置阻塞,代价为max(sum(1, p[1]-1), sum(p[1]+1,p[2]-1),...,a[p1]+...+a[pm]),求最小代价
题目思路:#includeusingnamespacestd;#defineintlonglong#definepbpush_back#definefifirst#definesesecond#definelsonp>S;f[1]=a[1];f[0]=0;S.insert({f[0],0});//设置虚拟点,方便后续状态转移S.insert({f[1],1});for(inti=2;ix){sum