![](https://img-blog.csdnimg.cn/20201014180756927.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
数论
饮酒在风里
这个作者很懒,什么都没留下…
展开
-
fzu 1752 快速幂取模+防溢出
Given A,B,C, You should quickly calculate the result of A^B mod C. (1<=A,B,C<2^63). Input There are multiply testcases. Each testcase, there is one line contains three integers A, B and C, sep...转载 2019-07-16 10:37:19 · 215 阅读 · 0 评论 -
快速求指定区间内素数数量(素数筛+前缀)
#include<bits/stdc++.h> using namespace std; int f[1000001]; bool vis[1000001]; void shai(int n) { f[1]=0; vis[1]=true; for(int i=2;i<=n;i++) { if(vis[i]==false) //...原创 2019-07-23 19:51:56 · 591 阅读 · 0 评论