返回列表 發帖
  1. #include<bits/stdc++.h>
  2. using namespace std;

  3. int main()
  4. {
  5.     string s;


  6.     while(cin>>s){
  7.         int a[26]={0};
  8.         string str;
  9.         for(int i=0;i<s.length();i++){
  10.            char c=s[i];
  11.            if(c>='A'&&c<='Z'){
  12.                 a[c-65]++;
  13.            }else if(c>='a'&&c<='z'){
  14.                 a[c-97]++;
  15.            }
  16.         }
  17.         int b=-1;
  18.         for(int i=0;i<26;i++){
  19.             if(a[i]%2!=0){
  20.                 b++;
  21.             }
  22.         }
  23.         if(b>0){
  24.             cout<<"no..."<<endl;
  25.         }else{
  26.             cout<<"yes !"<<endl;
  27.         }
  28.     }
  29.     return 0;
  30. }
複製代碼

TOP

返回列表