-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathSolution-CF236-D2-A
34 lines (32 loc) · 994 Bytes
/
Solution-CF236-D2-A
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
32
33
34
#include <iostream>
#include <string.h>
using namespace std;
int main(){
char input_string[100],differentCharacterString[100]={};
int counter=0,word_count=0;
cin>>input_string;
for(int index1=0;index1<100 && input_string[index1]!='\0';index1++){
if(index1==0)
differentCharacterString[0]=input_string[0];
else{
int broken=0;
for(int index2=0;differentCharacterString[index2]!=0 && index2<26;index2++){
if(input_string[index1]==differentCharacterString[index2]){
broken++;
break;
}
}
if(broken==0){
differentCharacterString[counter+1]=input_string[index1];
counter++;
}
}
}
for(int index3=0;differentCharacterString[index3]!=0;index3++)
word_count++;
if(word_count%2==0)
cout<<"CHAT WITH HER!";
else
cout<<"IGNORE HIM!";
return 0;
}