版本比较
第四届蒟蒻杯题解
正文
增加 11 行删除 11 行
22 行未改动232425262727282930313233333435363736373839404132 行未改动7475767778787980818211 行未改动9495969798989910010110233 行未改动13613713813914014014114214314414514514614714814915015115215215315415515629 行未改动18618718818919019019119219319451 行未改动246247248249250250251252253254102 行未改动全部展开22 行未改动 a=a1,b=b1; while(1) { if(a==b) { cout<<a; break; break; } if((a<b)!=(a1<b1)) break; cout<<a<<" "<<b<<" "; if(a<b) { a+=1; b-=1; b-=1; } else { a-=1; b+=1; } b+=1; } } return 0;}```32 行未改动 else { l2++; ans2[l2]=ans[i]; tag=1; } } } if(ans2[1]==0) cout<<0; else { cout<<"-";11 行未改动 ans[i+1]++; } } if(ans[l+1]) l++; for(int i=l;i>=1;i--) cout<<ans[i]; for(int i=l;i>=1;i--) cout<<ans[i]; } return 0;}```33 行未改动 cin>>a>>b>>x; bool next=0; while(level(a)!=level(b)) { if(b>a) swap(a,b); a/=2; a/=2; if(a==x) { cout<<"Y\n"; next=1; break; } } } if(next) continue; while(a!=b) { if(a==x||b==x) { next=1; break; } } a/=2; b/=2; } if(!next&&a!=x) cout<<"N\n";29 行未改动 mp[1][last]=1; ans[1]++; } l=1; } } } for(int i=1;i<=n;i++) cout<<ans[i]<<"\n"; return 0;}51 行未改动 sum[top]=sum[top-1]+x; } else if(op=='M') { data pp;pp.mode=0;pp.num=x;s[++top]=pp; sump[top]=sump[top-1]; sum[top]=sum[top-1]+x; sum[top]=sum[top-1]+x; } else if(op=='Q'){ int ans=0; int l=1,r=top; while(l<r) {102 行未改动全部展开