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
相關文章
相關標籤/搜索