Description
给出一个只由小写字母组成的字符串,如果出现的字母种类为奇数则输出IGNORE HIM!,是偶数则输出CHAT WITH HER!
Input
一个只由小写字母组成的字符串,字符串串长不超过100
Output
如果出现的字母种类为奇数则输出IGNORE HIM!,是偶数则输出CHAT WITH HER!
Sample Input
xiaodao
Sample Output
IGNORE HIM!
Solution
水题
Code
#include<cstdio>
#include<iostream>
#include<cstring>
#include<algorithm>
#include<cmath>
#include<vector>
#include<queue>
#include<map>
#include<set>
#include<ctime>
using namespace std;
typedef long long ll;
typedef pair<int,int>P;
const int INF=0x3f3f3f3f,maxn=100001;
char s[maxn];
int flag[33];
int main()
{
while(~scanf("%s",s))
{
memset(flag,0,sizeof(flag));
int n=strlen(s),num=0;
for(int i=0;i<n;i++)flag[s[i]-'a']=1;
for(int i=0;i<26;i++)num+=flag[i];
if(num%2==0)printf("CHAT WITH HER!\n");
else printf("IGNORE HIM!\n");
}
return 0;
}