版本比较
P12087题解
正文
增加 5 行删除 5 行
39 行未改动4041424344444546474832 行未改动8182838485858687888914 行未改动10410510610710810910810911011111211325 行未改动13914014114214314314414514614744 行未改动39 行未改动 } else if(a[i]>1){ f[i][0][0]+=(f[i-1][1][0]*(a[i]-1)+f[i-1][1][1]*(a[i]-1))%mod; f[i][0][1]+=(f[i-1][1][0]+f[i-1][1][1])%mod; } } else{ f[i][0][0]+=(f[i-1][1][0]+f[i-1][1][1])%mod; }}32 行未改动 } return f*x;}int Max(int a,int b){ return a>b?a:b; return a>b?a:b;}int Min(int a,int b){ return a<b?a:b;}14 行未改动 (ans.a[i][j]+=b.a[i][k]*a[k][j])%=mod; } } } return ans; } return ans; }}a[N],sum[N<<2],_1;node qwq(int v){ node tot; tot.a[0][0]=9;tot.a[0][1]=8;tot.a[1][0]=1;tot.a[1][1]=1;25 行未改动 else{ tot.a[2][2]+=1; tot.a[2][3]+=1; } return tot; return tot;}void build(int k,int l,int r){ if(l==r){ sum[k]=a[l];44 行未改动