文章
8
粉丝
0
获赞
58
访问
2.3k
UserDraft#include<iostream>
#include<string>
#include<climits>
using namespace std;
int main(){
int n;string s;
while(cin>>n>>s){
int count1=0;
int res=INT_MIN;int sum=0;//100100
for(int i=0;i<n;i++){
if(s[i]=='0'){
sum+=1;
}else{
count1++;
sum-=1;
}
res=res>sum? res:sum;
&n...
登录后发布评论
暂无评论,来抢沙发