标题
增加 1 行删除 1 行
1比赛总结1彼寄本
正文
增加 19 行删除 5 行
123446 行未改动5152535455565758596061626330 行未改动## 小技巧1.推得不充分必要条件时,可以使用hash转为充要条件,例题[P8819 [CSP-S 2022] 星战](https://www.luogu.com.cn/problem/P8819)46 行未改动26.[背包笑传之数量多猜种类少,多重背包开始洲际](https://www.luogu.com.cn/problem/CF1481F)27.[前缀和肘飞多重背包计数](https://www.luogu.com.cn/problem/AT_arc104_d)28.第二类斯特林数模板[P3904 三只小猪](https://www.luogu.com.cn/problem/P3904)29.二项式定理应用例题[P10185 [YDOI R1] Necklace](https://www.luogu.com.cn/problem/P10185)30.《注意到》$a+b=2\times(a\operatorname{and}b)+a\operatorname{xor}b$,例题[P10118 『STA - R4』And](https://www.luogu.com.cn/problem/P10118)(题解的做法)31.[cdq洲飞dp](https://www.luogu.com.cn/problem/P2487)32.[cdq和斜率优化一起洲际dp](https://www.luogu.com.cn/problem/P2497)33.算方案数时若总方案数不好算,考虑什么时候会导致方案数变化,计算这个突变点,例题[P7322 「PMOI-4」排列变换](https://www.luogu.com.cn/problem/P7322)## 小寄巧1.最值记录时初始值少开INT_MAX或30 行未改动1234567891011121314151617181946 行未改动66676869707172737475767730 行未改动## 数学公式### 二项式定理:$(a+b)^n=\sum\limits_{i=0}^n\dbinom{n}{i} a^i b^{n-i}$#### 拓展:$\sum\limits_{i=0}^n\dbinom{n}{i}=(1+1)^n$$\sum\limits_{i=0}^n(-1)^i\dbinom{n}{i}=[n=0]$### 二项式反演:若$g_n=\sum\limits_{i=0}^n\dbinom{n}{i}f_i$则有$f_n=\sum\limits_{i=0}^n(-1)^{n-i}\dbinom{n}{i}g_i$### 容斥原理:$|\bigcup\limits_{i=1}^nS_i|=\sum\limits_{i=1}^n(-1)^{i-1}\sum\limits_{a_i<a_i+1}|\bigcup\limits_{i=1}^iS_{a_i}|$## 小技巧1.推得不充分必要条件时,可以使用hash转为充要条件,例题[P8819 [CSP-S 2022] 星战](https://www.luogu.com.cn/problem/P8819)46 行未改动26.[背包笑传之数量多猜种类少,多重背包开始洲际](https://www.luogu.com.cn/problem/CF1481F)27.[前缀和肘飞多重背包计数](https://www.luogu.com.cn/problem/AT_arc104_d)28.第二类斯特林数模板[P3904 三只小猪](https://www.luogu.com.cn/problem/P3904)29.二项式定理应用例题[P10185 [YDOI R1] Necklace](https://www.luogu.com.cn/problem/P10185)30.[cdq洲飞dp](https://www.luogu.com.cn/problem/P2487)31.[cdq和斜率优化一起洲际dp](https://www.luogu.com.cn/problem/P2497)32.算方案数时若总方案数不好算,考虑什么时候会导致方案数变化,计算这个突变点,例题[P7322 「PMOI-4」排列变换](https://www.luogu.com.cn/problem/P7322)33.《注意到》$a+b=2\times(a\operatorname{and}b)+a\operatorname{xor}b$,例题[P10118 『STA - R4』And](https://www.luogu.com.cn/problem/P10118)(题解的做法## 小寄巧1.最值记录时初始值少开INT_MAX或30 行未改动