废话不多说,上代码!!! #include<iostream> #include<cstdio> #include<cmath> #include<cstring> #include<string> #include<algorithm> #include<cstdlib> #include<queue> #include<map> using namespace std; char a[100005]; int l; int ans1=0;//ans1指1的个数 int ans0=0;...