摘要: 二项式反演 简介 二项式反演可以用来解决一些计数问题,是连接 至少/至多 与 恰好 两类函数的桥梁。 形式一 \[f(n) = \sum_{i=0}^n (-1)^i \binom{n}{i} g(i) \\ g(n) = \sum_{i=0}^n (-1)^i \binom{n}{i} f(i) 阅读全文
posted @ 2024-05-30 20:16 DeepSeaSpray 阅读(12) 评论(1) 推荐(1) 编辑
摘要: P4491 [HAOI2018] 染色 的代码 #include<bits/stdc++.h> using namespace std; #define int long long const int maxn=2e7; const int mod=1004535809; const int mg= 阅读全文
posted @ 2024-05-30 20:15 DeepSeaSpray 阅读(0) 评论(0) 推荐(0) 编辑