Coldfresh的博客

keeeeeep!~

今天让我们来学一学积性函数的筛法

第一件事情我们要知道的是:积性函数都可以线性筛。(就是说复杂度是O(n)O(n)O(n) 积性函数的性质不说了,在说说常见的几个积性函数。 μ(n)μ(n)\mu(n):莫比乌斯函数 ϕ(n)ϕ(n)\phi(n):欧拉函数 d(n)d(n)d(n):一个数n的约数个数 σ(n)σ(n)...

2018-07-22 18:24:11

阅读数:104

评论数:0

Super A^B mod C FZU - 1759 (欧拉降幂)

Given A,B,C, You should quickly calculate the result ofABmodCABmodC A^B mod C. (1<=A,C<=1000000000,1<=B<=...

2018-04-12 16:44:21

阅读数:53

评论数:0

GCD HDU - 2588(欧拉函数)

The greatest common divisor GCD(a,b) of two positive integers a and b,sometimes written (a,b),is the largest divisor common to a and b,For example,(1...

2017-09-29 23:20:00

阅读数:83

评论数:0

Sticks and Right Triangle HDU - 3939(毕达哥拉斯)

We have a stick with infinite length. Now we want to cut 3 sub-sticks with length x, y, z which is not large than L to form a right triangle. With un...

2017-09-29 19:08:53

阅读数:101

评论数:0

Different Circle Permutation HDU - 5868(burnside引理+递推+矩阵快速幂+欧拉函数)

You may not know this but it’s a fact that Xinghai Square is Asia’s largest city square. It is located in Dalian and, of course, a landmark of the ci...

2017-09-07 13:58:35

阅读数:197

评论数:0

The Luckiest number POJ - 3696 (欧拉函数)

Chinese people think of ‘8’ as the lucky digit. Bob also likes digit ‘8’. Moreover, Bob has his own lucky number L. Now he wants to construct his luc...

2017-06-07 21:29:16

阅读数:154

评论数:0

Description has only two Sentences HDU - 3307(欧拉函数)(数论定理)

a n = X*a n-1 + Y and Y mod (X-1) = 0. Your task is to calculate the smallest positive integer k that a k mod a 0 = 0. Input Each line will cont...

2017-06-07 16:26:33

阅读数:186

评论数:0

Color POJ - 2154 (Polya定理)(欧拉函数优化)

Beads of N colors are connected together into a circular necklace of N beads (N<=1000000000). Your job is to calculate how many different kinds of...

2017-05-11 14:46:40

阅读数:181

评论数:0

提示
确定要删除当前文章?
取消 删除
关闭
关闭