totaled
totaled
全部文章
分类
atcoder(1)
codeforces(6)
leetcode(17)
Linux(5)
操作系统(2)
数据结构(7)
未归档(1)
算法(23)
网络编程(1)
计算机网络(5)
题解(84)
归档
标签
去牛客网
登录
/
注册
qin_peng
O_O
TA的专栏
10篇文章
0人订阅
Hello Code
10篇文章
8715人学习
全部文章
(共154篇)
2019ICPC 银川 D.Easy Problem(反演)
Easy Problem 当时现场赛因为题我推的公式,化简的时候,出现了这个错误,导致找bug找了2个小时。A掉之后已经没有时间写题了,学了这么久的数论,题真的是再简单不过的反演了,但是策略有问题,加上化简公式时出现的错误,没来的及写,真的很可惜。 最后用欧拉降幂,线性筛即可。 #inc...
莫比乌斯反演
欧拉降幂
2019-11-30
0
1352
HDU-6363 bookshelf
HDU-6363 bookshelf Patrick Star bought a bookshelf, he named it ZYG !! Patrick Star has book . The ZYG has layers (count from to ) and there is no...
莫比乌斯反演
2019-10-24
0
608
HDU-4947 GCD Array(反演)
GCD Array Teacher Mai finds that many problems about arithmetic function can be reduced to the following problem:Maintain an array a with index from ...
树状数组
莫比乌斯反演
2019-10-23
0
786
PE-608 Divisor Sums
Divisor Sums
莫比乌斯反演
2019-10-22
0
604
codeforces-839D(莫比乌斯反演)
codeforces-839D Winter is here 设,则答案可以表示为设,设的倍数个数为,则。所以有,反演得。 #include<bits/stdc++.h> using namespace std; const int N=1e6+6; const int p=...
莫比乌斯反演
2019-10-16
0
1082
codeforces 1017F
codeforces-1017F The Neutral Zone 这题内存限制只有16MB,考虑将2和3的倍数筛去,剩下的数只有1e8个,然后用bitset做标记数组,内存就只需要12MB.标记的数字下标刚好是i/3. #include<bits/stdc++.h> #de...
2019-10-16
0
1095
HDU-6134 (莫比乌斯反演)
HDU-6134 Battlestation Operational #include<bits/stdc++.h> using namespace std; const int N=1e6+6; const int p=1e9+7; typedef long long ll...
莫比乌斯反演
2019-10-15
0
748
PE-530 GCD of Divisors
GCD of Divisors
莫比乌斯反演
2019-10-11
0
579
HDU-6102 GCDispower
HDU-6102 GCDispower 给定一个的一个排列,有个查询。每次询问输出 离线处理,对于每次的询问,等价于求. 可以考虑枚举,讲右端点固定,那么对于这个区间中,所有的后 互相互质的对数乘,就是对左端点,所有区间的贡献。 将的倍数且位置小于的数筛出来后,考虑从大到小枚举,每次求与中互质...
树状数组
莫比乌斯反演
2019-10-10
0
598
Luogu-P5221 Product
Product #include<bits/stdc++.h> #define me(a,x) memset(a,x,sizeof(a)) #define IN freopen("in.txt","r",stdin); #define OUT freopen("out.tx...
莫比乌斯反演
欧拉函数
2019-10-10
0
765
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页