
莫比乌斯反演
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 · 299 阅读 · 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 · 266 阅读 · 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 · 354 阅读 · 0 评论