摘要: [Bags with Balls](https://codeforces.com/contest/1716/problem/F) 标号为奇数的个数为$c=\frac{m+1}{2}$ 标号为偶数个数为$w=m-c$ 答案显然为$ANS=\sum_{i=1}^{n}C(n,i)c^iw^{n-i}i^ 阅读全文
posted @ 2023-06-20 18:09 chdy 阅读(7) 评论(0) 推荐(0) 编辑
摘要: [集合计数](https://darkbzoj.cc/problem/2839) 设fi表示恰好交集为k的方案数。 设gi表示交集至少为k的方案数。 $g_i=\sum_{j=i}^{n} C(j,i)f_j$ 由二项式反演得: $f_k=\sum_{i=k}^{n}(-1)^{i-k}C(i,k) 阅读全文
posted @ 2023-06-20 17:35 chdy 阅读(17) 评论(0) 推荐(0) 编辑