![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
莫比乌斯反演
KetchupZ
退役acmer一名,CCPC银+ICPC铜(欢迎大家访问我的Github地址:https://github.com/LieLieLiekey)
展开
-
codeforces 900D. Unusual Sequences(莫比乌斯反演)
900D. Unusual Sequences(莫比乌斯反演)题目链接:传送门题意:给出 xxx 和 yyy ,求序列形如 a1,a2..ana_1,a_2..a_na1,a2..an 满足 gcd(a1,a2...an)=1gcd(a_1,a_2...a_n)=1gcd(a1,a2...an)=1 且 ∑i=1nai=y\sum_{i=1}^na_i=y∑i=1nai=y ...原创 2019-11-01 21:15:22 · 190 阅读 · 0 评论 -
欧拉,素数,莫比乌斯反演函数筛法
欧拉,素数,莫比乌斯反演函数筛法此筛法依据原理:每个合数肯定能被自己的最小素因子筛到,即val=素数*数。若没被筛到则为素数#include<cstdio>#include<algorithm>#include<string>#include<cstring>原创 2018-12-26 15:54:59 · 180 阅读 · 0 评论 -
I - GCD(莫比乌斯反演欧拉函数,HDU1695)
I - GCD(莫比乌斯反演/欧拉函数,HDU1695)Given 5 integers: a, b, c, d, k, you’re to find x in a…b, y in c…d that GCD(x, y) = k. GCD(x, y) means the greatest common divisor of x and y. Since the number of choices ...原创 2018-12-19 20:50:25 · 269 阅读 · 0 评论