k很小,每个可以保存覆盖0~k次的区间和,k次以上全算k次,可以做模板了View Code #include<cstdio>#include<cstring>#include<algorithm>using namespace std;typedef long long lld;#define lson l,m,rt<<1#define rson m+1,r,rt<<1|1const int maxn = 60000;int sum[maxn<<2][15];int cov[maxn<<2];int x[max Read More