版本比较
模板合集
正文
增加 13 行删除 13 行
4 行未改动56789910111213248 行未改动全部展开262263264265266266267268269270224 行未改动全部展开4954964974984994995005015025032 行未改动506507508509510510511512513514308 行未改动全部展开823824825826827827828829830831168 行未改动全部展开1000100110021003100410041005100610071008173 行未改动全部展开11821183118411851186118611871188118911904 行未改动1195119611971198119911991200120112021203289 行未改动全部展开149314941495149614971497149814991500150153 行未改动1555155615571558155915591560156115621563156415651565156615671568156935 行未改动160516061607160816091609161016111612161379 行未改动169316941695169616971697169816991700170162 行未改动4 行未改动#define M 998244353using namespace std;
int main(){
return 0;}```### tarjan248 行未改动全部展开 void read(char &ch){ ch=gc(); while(blank(ch)){ ch=gc(); } } } void push(const char &c){ #if DEBUG == 1 putchar(c);224 行未改动全部展开 int tmp=trp[x].son[1]; trp[x].son[1]=trp[tmp].son[0]; trp[tmp].son[0]=x; trp[trp[x].son[1]].fa=x; trp[tmp].fa=trp[x].fa; trp[tmp].fa=trp[x].fa; trp[x].fa=tmp; upds(x); upds(tmp); x=tmp;2 行未改动 int tmp=trp[x].son[0]; trp[x].son[0]=trp[tmp].son[1]; trp[tmp].son[1]=x; trp[trp[x].son[0]].fa=x; trp[tmp].fa=trp[x].fa; trp[tmp].fa=trp[x].fa; trp[x].fa=tmp; upds(x); upds(tmp); x=tmp;308 行未改动全部展开 else{ if(u!=0) ac[ac[u].son[i]].fail=ac[ac[u].fail].son[i]; q.push(ac[u].son[i]); } } } }}int main(){ scanf("%d",&n);168 行未改动全部展开int hea[40010],nex[80010],to[80010],wei[80010];int vis[40010],siz[40010],mcs[40010],ndl[40010];int u,v,w;int n,k;int ans; int ans;int ndc;int p;void ae(int x,int y,int z){ nex[++p]=hea[x];173 行未改动全部展开 for(int j=1;j<=n;j++){ if(s[i][j]=='O') ae(i,j,1); else if(s[i][j]=='N') ae(i,j,1e9); } } } ae(0,fa,ca); ae(ta,n+1,ca); ae(0,fb,cb); ae(tb,n+1,cb);4 行未改动 for(int j=1;j<=n;j++){ if(s[i][j]=='O') ae(i,j,1); else if(s[i][j]=='N') ae(i,j,1e9); } } } ae(0,fa,ca); ae(ta,n+1,ca); ae(0,tb,cb); ae(fb,n+1,cb);289 行未改动全部展开 } ll blk=max(xm,(ll)ceil(sqrt(z+z))); for(ll i=xm+1;i<=blk;i++){ tx=tx*x%z; if(tx==y) return i; if(tx==y) return i; } __gnu_pbds::gp_hash_table<ll,ll> hst; ll ty=y; for(ll i=0;i<blk;i++){53 行未改动 w=w*w%x; j++; } if(j==v+1) return 0; } } return 1;}int main(){ scanf("%lld",&a); if(mlrb(a)==1) printf("YE5\n"); else printf("NO\n"); else printf("NO\n"); return 0;}```### Pollard-Rho(P4718)35 行未改动 w=w*w%x; j++; } if(j==v+1) return 0; } } return 1;}vector<lll> pldr(lll x){ if(x==4) return vector<lll>(2,2);79 行未改动 ll tmp=cpla(c,m); if(tmp==-1) printf("Hola!\n"); else if(tmp==0) printf("0\n"); else printf("%lld %lld\n",min(tmp,m-tmp),max(tmp,m-tmp)); } } return 0;}```### SAM(P3804)62 行未改动