![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
欧拉函数
旺 崽
这个作者很懒,什么都没留下…
展开
-
POJ 2478 Farey Sequence
POJ 2478 Farey Sequence题目链接DescriptionThe Farey Sequence Fn for any integer n with n >= 2 is the set of irreducible rational numbers a/b with 0 < a < b <= n and gcd(a,b) = 1 arranged in increasing order. The first few areF2 = {1/2}F3 = {1/原创 2020-07-21 15:08:37 · 2327 阅读 · 1 评论 -
UVa 11426 GCD - Extreme (II)
UVa 11426 GCD - Extreme (II)欧拉函数的应用,AC代码如下:#include<bits/stdc++.h>using namespace std;typedef long long ll;const int N=4e6+5;ll a[N],phi[N];void prephi(){ memset(a,0,sizeof(a)); for(int i=1;i<=N;i++) phi[i]=i; for(int i=2;i<=N;原创 2020-07-10 10:49:55 · 2337 阅读 · 0 评论