版本比较
题解:P9190 [USACO23OPEN] Pareidolia G
正文
增加 3 行删除 3 行
119 行未改动全部展开1201211221231241241251261271284 行未改动1331341351361371371381391401415 行未改动1471481491501511511521531541558 行未改动119 行未改动全部展开 #define rs x*2+1 pio z[400005]; void up(int x){ z[x]=cheng(z[ls],z[rs]); } } void build(int x,int l,int r){ if(l==r){ z[x]=bd(s[l]); return ;4 行未改动 void modify(int x,int l,int r,int p){ if(l==r){ z[x]=bd(s[l]); return ; } } if(p<=md)modify(ls,l,md,p); else modify(rs,md+1,r,p); up(x); }5 行未改动 cin>>s>>t; n=s.size(); s=" "+s; tr.build(1,1,n); cout<<tr.z[1].a[8][7]<<"\n"; cout<<tr.z[1].a[8][7]<<"\n"; while(t--){ int x; char c; cin>>x>>c;8 行未改动