![](https://img-blog.csdnimg.cn/20190918140145169.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
中国剩余定理
China
狠人王
怀着一颗热情的心,追随自己的梦想!
展开
-
【HDU】Unknown Treasure(卢卡斯定理)(中国剩余定理)
http://acm.hdu.edu.cn/showproblem.php?pid=5446Problem DescriptionOn the way to the next secret treasure hiding place, the mathematician discovered a cave unknown to the map. The mathematician ...原创 2019-12-03 13:13:26 · 215 阅读 · 0 评论 -
快速乘优化中国剩余定理+高效取模操作
#include<bits/stdc++.h>using namespace std;typedef long long ll;ll k;ll a[20],b[20];ll qmul(ll a,ll b,ll mod){ ll ans=0; for(; b; b>>=1) { if(b&1) {...原创 2019-08-28 10:32:00 · 295 阅读 · 0 评论 -
HDU3579中国剩余定理
#include<bits/stdc++.h>using namespace std;typedef long long ll;int a[100],b[100];ll e_gcd (ll a, ll b, ll& x, ll& y){ if (b == 0) { x = 1, y = 0; return a...原创 2019-09-23 19:40:40 · 122 阅读 · 0 评论