版本比较
题解:P10653 [ROI 2017] 存储器 (Day 2)
正文
增加 0 行删除 2 行
36 行未改动373839404141424344464546474845 行未改动36 行未改动 else if(st.top().x!=ch&&st.top().len<res)res+=st.top().len,st.pop(),bj=1; if(!bj)break; } st.push((node){c[i],res});// cout<<res<<" "<<c[i]<<endl; } else { long long res=a[i],flag=0; while(!st.empty()){// cout<<"kkk\n"; bool bj=0; if(flag==0&&st.top().x==ch&&st.top().len>res) flag=1,res+=st.top().len,st.pop(),bj=1; else if(flag==1){45 行未改动