Em chào mọi người. Em có dòng code sau đây, mọi người cho em hỏi dòng x-= z==o;
có nghĩa là sao vậy ạ? Em cảm ơn ạ.
int main(){
ios_base::sync_with_stdio(false);
cin.tie(NULL);
int n,o,z;
cin >> n;
string s;
while (n--){
cin>> s;
o=count(s.begin(),s.end(),'1');
z=count(s.begin(),s.end(),'0');
int x=min(o,z);
x-= z==o;
cout << x<<endl;
}
return 0;
}