
欧拉函数
coldfresh
那我们开始吧
展开
-
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 the necklace can be produced. You should know that the原创 2017-05-11 14:46:40 · 478 阅读 · 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 contain only three integers X, Y, a 0 ( 1 < X < 2 31, 0原创 2017-06-07 16:26:33 · 382 阅读 · 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 luckiest number which is the minimum among all positive原创 2017-06-07 21:29:16 · 404 阅读 · 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 city. It’s an ideal place for outing any time of the y原创 2017-09-07 13:58:35 · 458 阅读 · 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 unknown reasons we assume that x, y, z are all integer原创 2017-09-29 19:08:53 · 335 阅读 · 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,2)=1,(12,18)=6. (a,b) can be easily found by the原创 2017-09-29 23:20:00 · 475 阅读 · 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<=101000000).(1<=A,C<=1000000000,1<=B<=101000000).(1原创 2018-04-12 16:44:21 · 389 阅读 · 0 评论 -
今天让我们来学一学积性函数的筛法
第一件事情我们要知道的是:积性函数都可以线性筛。(就是说复杂度是O(n)O(n)O(n) 积性函数的性质不说了,在说说常见的几个积性函数。 μ(n)μ(n)\mu(n):莫比乌斯函数 ϕ(n)ϕ(n)\phi(n):欧拉函数 d(n)d(n)d(n):一个数n的约数个数 σ(n)σ(n)σ(n):一个数n的约数和那我们就来筛筛看吧,(注意:所有线性筛积性函数都必须基于线性筛素数。 ...原创 2018-07-22 18:24:11 · 493 阅读 · 0 评论