上一页 1 ··· 5 6 7 8 9 10 11 下一页

2019年1月24日

字典树

摘要: #include using namespace std; #define IO ios_base::sync_with_stdio(false);cin.tie(0);cout.tie(0) const int maxnode=700000+5; const int sigma_size=26; const int mod=20071027; char tmp[200+5]; char st[... 阅读全文

posted @ 2019-01-24 23:35 欣崽 阅读(179) 评论(0) 推荐(0)

ST表

摘要: //ST表#include #define IO ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0) //#define int long long using namespace std; const int maxn=100000+5; int d[maxn][32]; void RMQ_init(int *A,int n) { f... 阅读全文

posted @ 2019-01-24 12:11 欣崽 阅读(204) 评论(0) 推荐(0)

树状数组

摘要: uvalive4329 阅读全文

posted @ 2019-01-24 11:31 欣崽 阅读(180) 评论(0) 推荐(0)

2018年12月25日

康托展开

摘要: int fac[]={1,1,2,6,24,120,720,5040,40320,362880}; int Cantor(int *s,int n)//从1开始编号 { int ans=0; for(int i=0;i<n;i++){ int tmp=0; for(int j=i+1;j<n;j++) if(s[j]<s[i... 阅读全文

posted @ 2018-12-25 16:21 欣崽 阅读(168) 评论(0) 推荐(0)

2018年12月17日

容斥定理

摘要: #include #include using namespace std; long long Gcd(long long a,long long b){ return b==0?a:Gcd(b,a%b); } long long cal(long long n,int *p,int cnt){ long long res=0; for(int i=1;i>=1; ... 阅读全文

posted @ 2018-12-17 12:44 欣崽 阅读(220) 评论(0) 推荐(0)

扩展中国剩余定理

摘要: #include using namespace std; #define ll long long ll Left[10+5],M[10+5]; ll exgcd(ll a,ll b,ll &x,ll &y){ if(!b){x=1,y=0;return a;} ll re=exgcd(b,a%b,x,y),tmp=x; x=y,y=tmp-(a/b)*y; r... 阅读全文

posted @ 2018-12-17 12:12 欣崽 阅读(228) 评论(0) 推荐(0)

2018年12月15日

卢卡斯定理模板

摘要: #define ll long long ll Exgcd(ll a,ll b,ll& x,ll& y){ if(a%b==0){ x=0,y=1; return b; } ll r,tx,ty; r=Exgcd(b,a%b,tx,ty); x=ty; y=tx-a/b*ty; } ll Comp(ll a,ll... 阅读全文

posted @ 2018-12-15 15:53 欣崽 阅读(194) 评论(0) 推荐(0)

大数取模

摘要: HDU1212 阅读全文

posted @ 2018-12-15 13:26 欣崽 阅读(380) 评论(0) 推荐(0)

欧拉降幂

摘要: 阅读全文

posted @ 2018-12-15 12:50 欣崽 阅读(167) 评论(0) 推荐(0)

2018年12月10日

扩展中国剩余定理

摘要: poj2891 阅读全文

posted @ 2018-12-10 22:39 欣崽 阅读(197) 评论(0) 推荐(0)

上一页 1 ··· 5 6 7 8 9 10 11 下一页

导航