版本比较
CF1861C Queries for the Array 题解
正文
增加 2 行删除 2 行
39 行未改动4041424344454647483 行未改动5253545556575859607 行未改动39 行未改动{if(cnt==cnt2||cnt<=1){flag = 0;}if(cnt1==0) cnt1 = cnt;}if(s[i]=='1'){3 行未改动}cnt2 = cnt;}if(s[i]=='+') cnt++;if(s[i]=='-'){cnt--;if(cnt<cnt1) cnt1 = 0;if(cnt<cnt2) cnt2 = cnt;7 行未改动39 行未改动4041424344454647483 行未改动5253545556575859607 行未改动39 行未改动{if(cnt==cnt2||cnt<=1){flag = 0;}if(cnt1==0) cnt1 = cnt;}if(s[i]=='1'){3 行未改动}cnt2 = cnt;}if(s[i]=='+') cnt++;if(s[i]=='-'){cnt--;if(cnt<cnt1) cnt1 = 0;if(cnt<cnt2) cnt2 = cnt;7 行未改动