BZOJ 2274 [Usaco2011 Feb]Generic Cow Protests

【题解】   很容易可以写出朴素DP方程f[i]=sigma f[j] (sum[i]>=sum[j],1<=j<=i).  于是我们用权值树状数组优化即可。    1 #include<cstdio> 2 #include<algorithm> 3 #define N 200010 4 #define rg register 5 #define LL long long 6 #de
相关文章
相关标签/搜索