Advertisement
Guest User

Untitled

a guest
Apr 3rd, 2020
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.72 KB | None | 0 0
  1. #include<bits/stdc++.h>
  2. using namespace std;
  3.  
  4. main()
  5. {
  6.     string input_string;
  7.     int sort_by_ascii[100], count=0;
  8.  
  9.     cin>>input_string;
  10.  
  11.     for(int i=0; i<input_string.size(); i++)
  12.     {
  13.         sort_by_ascii[i]=input_string[i];
  14.     }
  15.    
  16.     sort(sort_by_ascii, sort_by_ascii+sizeof(sort_by_ascii)/sizeof(sort_by_ascii[0]));
  17.  
  18.     for(int i=0; i<input_string.size(); i++)
  19.     {
  20.         if(sort_by_ascii[i]!=sort_by_ascii[i+1])
  21.         {
  22.             count++;
  23.         }
  24.         while(sort_by_ascii[i]=sort_by_ascii[i+1])
  25.         {
  26.             //repeatation logic?????
  27.         }
  28.     }
  29.     if(count%2==0)
  30.     {
  31.         cout<<"CHAT WITH HER!";
  32.     }
  33.     else
  34.     {
  35.         cout<<"IGNORE HIM!";
  36.     }
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement