Codeforces Round #169 (Div. 2) 276B - Little Girl and Game Solution
Problem Link: https://codeforces.com/contest/276/problem/B
Solution in C++:
///La ilaha illellahu muhammadur rasulullah
///******Bismillahir-Rahmanir-Rahim******///
///Abul Hasnat Tonmoy
///Department of CSE,23rd batch
///Islamic University,Bangladesh
#include <bits/stdc++.h>
using namespace std;
int a[50];
int main()
{
string s;
int i,c;
cin>>s;
for(int i=0; i<s.size(); ++i)
a[s[i]-'a']++;
c=0;
for( i=0; i<26; ++i)
{
if(a[i]%2)
{
c++;
}
}
if(c%2||c==0)
{
cout<<"First"<<endl;
return 0;
}
cout<<"Second"<<endl;
return 0;
}
No comments