Sunday, May 1, 2016

Codeforces 236A - Boy or Girl

#include<bits/stdc++.h>
using namespace std;
int main()
{
    char s[100],temp[100];
    int len,counter=0, j=0;
    gets(s);
    len=strlen(s);
   sort(s,s+len);
   for(int i=0; i<len; i++){
        if(s[i]!=s[i-1]){
            temp[j]=s[i];
            j++;
        }
   }
   temp[j]='\0';
   if(strlen(temp)%2==0)
    cout<<"CHAT WITH HER!\n";
   else
   cout<<"IGNORE HIM!\n";

    return 0;
}

No comments:

Post a Comment