![](https://img-blog.csdnimg.cn/20201014180756925.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
蓝书数论
只努力的程序猿
临渊羡鱼,不如退而结网
展开
-
刘汝佳-训练指南-数论-基本概念
素数 因子只有1和本身; #define maxn 100000 int vis[maxn], prime[maxn];//vis为1-合数,vis为0-素数1 int n; void seize(int n) { //筛掉素数 int m = sqrt(n) + 0.5; memset(vis, 0, sizeof(vis)); for (int i = 2; i <=...原创 2019-09-24 21:32:25 · 160 阅读 · 0 评论 -
刘汝佳-数论-模方程
线性模方程。 类似与 x%m1=a1 x%m2=a2 x%m3=a3 ……………… x%mn-1=an-1 x%mn=a; 求x的最小整数解 强推这个博客大神 我们引入中国剩余定理,首先我们将 所有的m相乘得出M= \prod_{i=1}^{n}|\ ...原创 2019-09-27 10:46:15 · 270 阅读 · 0 评论 -
训练指南-数论-课后入门习题
- 最小公约数和最大公倍数 #include<iostream> #include<algorithm> #include<string.h> #include<cmath> using namespace std; long long G, L; int main() { int t; cin >> t; while (t--...原创 2019-10-04 10:38:55 · 264 阅读 · 0 评论