
数论-莫比乌斯反演
Stephencurry‘s csdn
这个作者很懒,什么都没留下…
展开
-
Visible Lattice Points (SPOJ-VLATTICE)(莫比乌斯反演)
Consider a N*N*N lattice. One corner is at (0,0,0) and the opposite one is at (N,N,N). How many lattice points are visible from corner at (0,0,0) ? A point X is visible from point Y iff no other latti...原创 2020-04-27 15:03:31 · 190 阅读 · 0 评论 -
能量采集 (HYSBZ-2005) (莫比乌斯反演)
栋栋有一块长方形的地,他在地上种了一种能量植物,这种植物可以采集太阳光的能量。在这些植物采集能量后,栋栋再使用一个能量汇集机器把这些植物采集到的能量汇集到一起。 栋栋的植物种得非常整齐,一共有n列,每列有m棵,植物的横竖间距都一样,因此对于每一棵植物,栋栋可以用一个坐标(x, y)来表示,其中x的范围是1至n,表示是在第x列,y的范围是1至m,表示是在第x列的第y棵。 由于能量汇集机器...原创 2020-04-25 17:15:02 · 208 阅读 · 0 评论 -
Problem b (HYSBZ-2301)(莫比乌斯反演)
对于给出的n个询问,每次求有多少个数对(x,y),满足a≤x≤b,c≤y≤d,且gcd(x,y) = k,gcd(x,y)函数为x和y的最大公约数。Input第一行一个整数n,接下来n行每行五个整数,分别表示a、b、c、d、kOutput共n行,每行一个整数表示满足要求的数对(x,y)的个数Sample Inp...原创 2020-04-25 16:09:34 · 237 阅读 · 0 评论 -
Gcd (HYSBZ-2818)(莫比乌斯反演)
给定整数N,求1<=x,y<=N且Gcd(x,y)为素数的数对(x,y)有多少对.Input一个整数NOutput如题Sample Input4Sample Output4Hinthint对于样例(2,2),(2,4),(3,3),(4,2)1<=N<=10^7题意:中文题,不过多叙述题意。思路:...原创 2020-04-24 18:12:08 · 210 阅读 · 0 评论 -
GCD (HDU-1695)(莫比乌斯反演)
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 large, you're...原创 2020-04-24 16:23:35 · 486 阅读 · 0 评论