
数论 中国剩余定理
csu_xiji
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
hihocoder 1303 数论六·模线性方程组 扩展中国剩余定理
https://vjudge.net/problem/HihoCoder-1303 思路:模板题。 #include<cstdio> using namespace std; typedef long long ll; const int maxn=1005; int n; ll a[maxn],m[maxn]; ll exgcd(ll a,ll b,ll &x,ll ...原创 2020-03-08 15:11:00 · 162 阅读 · 1 评论 -
POJ 1006 Biorhythms 中国剩余定理
https://vjudge.net/problem/POJ-1006 思路:中国剩余定理。 #include<cstdio> using namespace std; typedef long long ll; ll a[3]; ll m[3]={23,28,33}; ll exgcd(ll a,ll b,ll &x,ll &y) { if(b==0) ...原创 2020-03-08 14:34:16 · 186 阅读 · 1 评论 -
Comet OJ - Contest #16(新年快乐)小 C 的数论习题 CRT
https://www.cometoj.com/contest/84/problem/A?problem_id=4299 思路:CRTCRTCRT模板题啊,唯一要注意的就是题目要求答案是个正整数,因此如果CRTCRTCRT计算出的结果是000的话要输出23∗233∗233323*233*233323∗233∗2333。 #include<bits/stdc++.h> using na...原创 2020-01-20 21:46:10 · 309 阅读 · 0 评论 -
洛谷 P4245 【模板】任意模数NTT
https://www.luogu.com.cn/problem/P4245 #include<bits/stdc++.h> using namespace std; //FFT模板 typedef long long ll; const int maxn=1e5+5; int idx=0;//次数 int n,m,realmod; int limit,bit,le...原创 2020-01-13 18:58:42 · 206 阅读 · 0 评论 -
洛谷 P4777 【模板】扩展中国剩余定理(EXCRT)
https://www.luogu.com.cn/problem/P4777 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=1e5+5; int n; ll a[maxn],m[maxn]; ll qmul(ll a,ll b,ll p) { ll an...原创 2020-01-13 15:54:46 · 505 阅读 · 0 评论 -
洛谷 P3868 [TJOI2009]猜数字 中国剩余定理
https://www.luogu.com.cn/problem/P3868 思路:CRTCRTCRT模板题啊。 #include<bits/stdc++.h> using namespace std; typedef long long ll; const int maxn=15; int n; ll a[maxn],m[maxn]; ll qmul(ll a,ll b,ll...原创 2020-01-13 15:13:31 · 215 阅读 · 0 评论