Algorithm
Code Examples
#1 Code Example with C++ Programming
Code -
C++ Programming
#include<iostream>
#include<string>
#include<algorithm>
using namespace std;
int main(){
string s;
cin>>s;
int count = 1;
sort(s.begin(), s.end());
char elem = s[0];
for(int i = 0; i < s.size(); i++){
if(s[i] != elem){
elem = s[i];
count++;
}
}
if(count % 2 == 0){
cout<<"CHAT WITH HER!";
}
else{
cout<<"IGNORE HIM!";
}
return 0;
}
Copy The Code &
Try With Live Editor
Input
wjmzbmr
Output
CHAT WITH HER!
Demonstration
Codeforcess Solution 236-A A. Boy or Girl ,C++, Java, Js and Python,236-A,Codeforcess Solution