Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <sstream>
- using namespace std;
- int main()
- {
- string line;
- while(getline(cin,line))
- {
- char input;
- istringstream cin(line);
- char alpha[26]={0};
- while(cin>>input)
- {
- if(isalpha(input))
- {
- alpha[(tolower(input)-'a')]++;
- }
- }
- int oddSum=0;
- for(int i=0;i<26;i++)
- {
- oddSum += alpha[i]&1;
- //oddSum += alpha[i]%2;
- }
- if(oddSum>1)
- {
- cout<<"no..."<<endl;
- }
- else
- {
- cout<<"yes !"<<endl;
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement