数论
丽尔巴茨
这个作者很懒,什么都没留下…
展开
-
数论 模板
跟着yxc大佬的脚步,开启acm数论的篇章,也作些总结,写一些博客; 线性筛,筛素数: ``` #include <stdio.h> using namespace std; const int maxn=1e7+7; int prime[maxn],cnt; bool vis[maxn]; void get_prime(int n){ for(int i=2;i&l...原创 2019-06-27 16:45:57 · 99 阅读 · 0 评论 -
p2257 yy的gcd 莫比乌斯反演入门题
ans= 看着大佬推的式子 敲代码a了,感觉还得自己练一下推式子的能力 #include <stdio.h> #include <string.h> #include <algorithm> using namespace std; typedef long long ll; const int maxn=1e7+7; int prime[maxn],mu[m...原创 2019-09-04 11:46:56 · 126 阅读 · 0 评论 -
hdu 1695 gcd 莫比乌斯反演模板题
#include <stdio.h> #include <string.h> #include <algorithm> using namespace std; typedef long long ll; const int maxn=1e5+7; int prime[maxn],mu[maxn],tot; bool p[maxn]; ll sum[maxn]...原创 2019-09-04 16:38:31 · 105 阅读 · 0 评论