fork download
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. char string[100];
  7. cin>>string;
  8. int count;
  9.  
  10. for(int i = 0; i < strlen(string); i++) {
  11. count = 1;
  12. for(int j = i+1; j < strlen(string); j++) {
  13. if(string[i] == string[j] && string[i] != ' ') {
  14. count++;
  15. //Set string[j] to 0 to avoid printing visited character
  16. string[j] = '0';
  17. }
  18. }
  19. if(count > 1 && string[i] != '0')
  20. count--;
  21. }
  22. //Displays the total number of characters present in the given string
  23. if(count % 2==0)
  24. {
  25. cout<<"CHAT WITH HER!";
  26. }
  27. else{
  28. cout<<"IGNORE HIM!";
  29. }
  30.  
  31. return 0;
  32. }
Success #stdin #stdout 0s 4896KB
stdin
wjmzbmr
stdout
IGNORE HIM!