![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
莫比乌斯反演
Eiffel灬
这个作者很懒,什么都没留下…
展开
-
莫比乌斯反演
莫比乌斯函数,它的定义如下: (1)若,那么 (2)若,均为互异素数,那么 (3)其它情况下 莫比乌斯函数计算模板:#define MAXN 101 bool vis[MAXN]; int primes[MAXN]; int miu[MAXN]; int calc(int limit) { memset(vis,原创 2017-07-28 17:11:42 · 267 阅读 · 0 评论 -
HDU-1695 GCD(莫比乌斯反演)
GCD 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 may be very larg原创 2017-08-18 16:44:41 · 242 阅读 · 0 评论 -
HDU-2841 Visible Trees (莫比乌斯反演)
Visible Trees There are many trees forming a m * n grid, the grid starts from (1,1). Farmer Sherlock is standing at (0,0) point. He wonders how many trees he can see. If two trees and S原创 2017-08-21 11:21:48 · 308 阅读 · 0 评论