update code

This commit is contained in:
ShazidMahsrafi 2023-06-23 21:43:10 +06:00
parent e0d82eb32c
commit dcd7dbed7e

View File

@ -1,20 +1,33 @@
#include <bits/stdc++.h> #include <bits/stdc++.h>
using namespace std; using namespace std;
using ll = long long;
int l[26];
void solve()
{
string s;
cin>>s;
for(int i=0; i<s.size(); ++i)
{
l[s[i]-'a']++;
}
int ct=0;
for(int i=0; i<26; ++i)
{
if(l[i]>0) ct++;
}
if(ct%2==0) cout<<"CHAT WITH HER!"<<endl;
else cout<<"IGNORE HIM!"<<endl;
}
int main() int main()
{ {
char name[100]; ios_base::sync_with_stdio(false);
cin>>name; cin.tie(nullptr);
int i,j,len,count=0;
len=strlen(name); int TC = 1;
for(i=0;i<len;i++) //cin >> TC;
{ //cin.ignore();
for(j=i+i;j<len;j++) while (TC--) solve();
{
if(name[i]==name[j]) count++;
}
}
cout<<len-count<<endl;
if((len-count)%2!=0) cout<<"IGNORE HIM!"<<endl;
else cout<<"CHAT WITH HER!"<<endl;
} }