莫比乌斯反演
SSimpLe_Y
人一我百,人十我万,然而我做不到。
展开
-
bzoj 2301 [HAOI2011]Problem b (莫比乌斯反演)
Description对于给出的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、k Output共n行,每行一个整数表示满足要求的数对(x,y)的个数 Sample In原创 2017-08-16 10:21:10 · 885 阅读 · 0 评论 -
hdu 1695 GCD(莫比乌斯反演)
Problem DescriptionGiven 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 ma原创 2017-08-14 16:59:05 · 804 阅读 · 0 评论 -
hdu 6053 TrickGCD(莫比乌斯反演)
Problem DescriptionYou are given an array A , and Zhu wants to know there are how many different array B satisfy the following conditions?* 1≤Bi≤Ai* For each pair( l , r ) (1≤l≤r≤n) ,原创 2017-08-14 20:45:57 · 785 阅读 · 0 评论 -
bzoj 2818 Gcd(莫比乌斯反演)
Description给定整数N,求1数对(x,y)有多少对.Input一个整数NOutput如题Sample Input4Sample Output4HINThint对于样例(2,2),(2,4),(3,3),(4,2)1裸莫比乌斯反演。设F(n) 为gcd是n原创 2017-08-15 10:29:51 · 856 阅读 · 0 评论 -
bzoj 2005 能量采集(莫比乌斯反演)
Description栋栋有一块长方形的地,他在地上种了一种能量植物,这种植物可以采集太阳光的能量。在这些植物采集能量后,栋栋再使用一个能量汇集机器把这些植物采集到的能量汇集到一起。 栋栋的植物种得非常整齐,一共有n列,每列有m棵,植物的横竖间距都一样,因此对于每一棵植物,栋栋可以用一个坐标(x, y)来表示,其中x的范围是1至n,表示是在第x列,y的范围是1至m,表示是在第x原创 2017-08-15 10:38:18 · 810 阅读 · 0 评论 -
spoj 7001 VLATTICE - Visible Lattice Points(莫比乌斯反演)
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原创 2017-08-15 10:48:22 · 818 阅读 · 0 评论