daily pastebin goal
7%
SHARE
TWEET

Untitled

a guest Feb 24th, 2013 1,225 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <iostream>
  2. #include <string>
  3. #include <string.h>
  4.  
  5. using namespace std;
  6. string s;
  7. int cnt[30];
  8. int main()
  9. {
  10.    
  11.         cin>>s;
  12.         for (int i=0; i<s.size(); ++i)
  13.                 cnt[s[i]-'a']++;
  14.         int odd=0;
  15.         for (int i=0; i<26; ++i)
  16.                 if (cnt[i]&1)
  17.                         odd++;
  18.         if ((odd==0) || (odd&1))
  19.                 cout<<"First"<<endl;
  20.         else
  21.                 cout<<"Second"<<endl;
  22.     return 0;
  23. }
RAW Paste Data
Top