1.B - Beautiful Strings (atcoder.jp)
代码:
1 #include <bits/stdc++.h> 2 using namespace std; 3 4 int n; 5 int cnt[500]; 6 string s; 7 int mian() { 8 cin>>s; 9 n=s.size(); 10 s=' '+s; 11 12 for(int i=1; i<=n; i++) { 13 cnt[s[i]]++; 14 } 15 16 int ok=1; 17 for(int i='a'; i<='z'; i++) { 18 if(cnt[i]%2==1) ok=0; 19 } 20 if(ok) cout<<"Yes" ; 21 else cout<<"No"; 22 }View Code
标签:11,cnt,int,mian,类型,字符串,size From: https://www.cnblogs.com/rw666/p/17809494.html