![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
数论——生成函数
#
夕林山寸
这个作者很懒,什么都没留下…
展开
-
生成函数进阶(普通型生成函数)
https://www.cnblogs.com/RabbitHu/p/9178645.html https://zhuanlan.zhihu.com/p/52817010 https://baike.baidu.com/item/%E7%94%9F%E6%88%90%E5%87%BD%E6%95%B0/1198009?fr=aladdin 等下做几道题练练手 https://www.luogu.com.cn/problem/P2000 https://acm.taifua.com/bzoj原创 2020-07-26 18:23:32 · 223 阅读 · 0 评论 -
HDU - 2110 生成函数基础题
最后一道水题了。顺便水水博客,香啊。 #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define ls (o<<1) #define rs (o<<1|1) #define pb push_back const int M = 11000+7;原创 2020-07-26 15:29:56 · 127 阅读 · 0 评论 -
Fruit HDU - 2152 生成函数基础题
还是水题。。 这题每个种类数目起点不为0; #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define ls (o<<1) #define rs (o<<1|1) #define pb push_back const int M = 110+原创 2020-07-26 14:56:57 · 705 阅读 · 0 评论 -
HDU - 2082 生成函数基础题
这些题都可以暴力直接做,但用于练习生成函数。(虽然并没有。。。马上做几道难题练练) #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define ls (o<<1) #define rs (o<<1|1) #define pb push_back原创 2020-07-26 14:49:59 · 157 阅读 · 0 评论 -
HDU - 2079 生成函数基础题
依旧是这个生成函数。。怎么这么多水题啊。。 #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define ls (o<<1) #define rs (o<<1|1) #define pb push_back const int M = 40+7;原创 2020-07-26 14:45:10 · 140 阅读 · 0 评论 -
[HDU-1398] 生成函数基础题
还是经典生成函数: (1+x^i) #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define ls (o<<1) #define rs (o<<1|1) #define pb push_back const int M = 300+7; /原创 2020-07-26 14:40:19 · 265 阅读 · 0 评论 -
[HDU-1171] 生成函数入门题
依旧是最基础的生成函数。 (1+x^i)*…… 直接用lst每次上界最大值优化就够了。(因为最坏情况是尽量跑满,所以没必要记录已有的数值) #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define ls (o<<1) #define rs (o<原创 2020-07-26 14:17:45 · 761 阅读 · 0 评论 -
HDU1085 —— 生成函数入门题
(1+X^i)*…… 最经典的生成函数。 #include<iostream> #include<cstring> #include<algorithm> #include<vector> using namespace std; typedef long long ll; #define ls (o<<1) #define rs (o<<1|1) #define pb push_back const int M = 1e4+7原创 2020-07-26 13:40:04 · 183 阅读 · 0 评论 -
[HDU-1028] 生成函数 入门题
拆分整数N,问有几种方案。 相当于有若干i,进行组合。 构造生成函数: 最后的系数就是结果。 用n^3的循环跑出结果。 g[i][j],表示处理到第 i&1 种数凑成 j 的方案数是多少? #include<iostream> #include<algorithm> #include<cstring> using namespace std; typedef long long ll; const int M = 200+7; ll g[2][原创 2020-07-25 20:41:01 · 179 阅读 · 0 评论