-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathCF236ABoyOrGirl.java
More file actions
31 lines (27 loc) · 914 Bytes
/
CF236ABoyOrGirl.java
File metadata and controls
31 lines (27 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.ArrayList;
import java.util.List;
/**
* See
* <a href="http://codeforces.com/problemset/problem/236/A">Boy or girl</a>
*
* @author Brian Yeicol Restrepo Tangarife
*/
public class CF236ABoyOrGirl {
static BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
static PrintWriter out = new PrintWriter(System.out);
public static void main(String[] args) throws IOException {
char[] letters = in.readLine().toCharArray();
List<Character> diffents = new ArrayList<>();
for (char letter : letters) {
if (!diffents.contains(letter)) {
diffents.add(letter);
}
}
out.print(diffents.size() % 2 == 0 ? "CHAT WITH HER!" : "IGNORE HIM!");
out.close();
}
}