#include<iostream>
using namespace std;
string a,s;
int n,i,j,t,k;
int main()
{
while(cin>>s)
{
a.clear();
for(i=0;i<s.length();i++)
{
if(isalpha(s[i])==1)
a.append(s.substr(i,1));
else if(isalpha(s[i])==2)
{
s[i]-=32;
a.append(s.substr(i,1));
}
}
k=2;
n=a.length();
if(n==0)
{
cout<<"no..."<<endl;
continue;
}
for(i=0;i<n;i++)
{
t=0;
if(a.find(a.substr(i,1))<i)
continue;
t++;
for(j=i+1;j<n;j++)
{
if(a.at(i)==a.at(j))
t++;
}
if(t%2==1)
{
k--;
if(k==0)
{
cout<<"no..."<<endl;
break;
}
}
}
if(k)
cout<<"yes !"<<endl;
}
return 0;
}
請問這樣有錯嗎?我怎麼會WA(line1)?