题解 | 小红的01串
小红的01串
https://www.nowcoder.com/practice/8920f77fb2c0409a9f4f9025969110de
#include <iostream>
#include<unordered_map>
#define ll long long
using namespace std;
int main() {
int q;
cin>>q;
string s;
unordered_map<char,ll>cnt;
while(q--){
cin>>s;
for(char a:s){
cnt[a]++;
}
if(cnt['0']%2==0||cnt['1']%2==0)cout<<"Yes"<<endl;
else cout<<"No"<<endl;
cnt.clear();
}
return 0;
}

华为HUAWEI工作强度 1363人发布