The problem is from codeforces: http://www.codeforces.com/problemset/problem/236/A

This simple problem can be solved easily. I use C# to practice the use of Hashset. Bruteforce O(n) each character and count the identical characters.
// acm.steakovercooked.com
using System;
using System.Collections.Generic;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
HashSet aa = new HashSet();
string s = Console.ReadLine();
foreach (char ch in s)
{
if (!aa.Contains(ch))
{
aa.Add(ch);
}
}
Console.Write((aa.Count & 1) == 0 ? "CHAT WITH HER!" : "IGNORE HIM!");
}
}
}
–EOF (The Ultimate Computing & Technology Blog) —
154 wordsLast Post: Codeforces: 237A Free Cash
Next Post: Sign Area of Irregular Polygon