版本比较
+1 −1增加 1 行删除 1 行
30 行未改动3132333435353630 行未改动 ans=min(ans,pre[i]-mx); //记录答案最小值 } cout<<n-sum+ans; //输出答案 return 0;} }```