摘要:
8.5 异或马拉车 P3501 8.6 ACAM #include<bits/stdc++.h> using namespace std; const int N=2e5+10;int n; int trans[N][26]; int cnt=0; int fail[N]; int to[N]; i 阅读全文
摘要:
7.29 数论 CRT板子 //x=a(mod m) Int A=0,M=1; for(int i=1;i<=n;i++){ Int x,y; Int k=exgcd(M,m[i],x,y); if((A-a[i])%k!=0) return -1; x*=(A-a[i])/k; A-=x*M; M 阅读全文