fork download
  1. #include<cstdio>
  2. #include<sstream>
  3. #include<cstdlib>
  4. #include<cctype>
  5. #include<cmath>
  6. #include<algorithm>
  7. #include<set>
  8. #include<queue>
  9. #include<stack>
  10. #include<list>
  11. #include<iostream>
  12. #include<fstream>
  13. #include<numeric>
  14. #include<string>
  15. #include<vector>
  16. #include<cstring>
  17. #include<map>
  18. #include<iterator>
  19. using namespace std;
  20. #define ll long long int
  21. #define mx 10000005
  22. #define mod 100000007
  23. #define inf 0x3f3f3f3f
  24.  
  25. int main()
  26. {
  27. string s;
  28. int i,l;
  29. while(getline(cin,s)){
  30. vector<char>a;
  31. vector<char>b;
  32. if(s=="DONE")return 0;
  33. l=s.size();
  34. for(i=0;i<l;i++){
  35. if(s[i]>='A' && s[i]<='Z') s[i]+=32;
  36. if(s[i]>='a' && s[i]<='z') a.push_back(s[i]);
  37. }
  38. b=a;
  39. reverse(b.begin(),b.end());
  40. if(a==b)cout<<"You won't be eaten!"<<endl;
  41. else cout<<"Uh oh.."<<endl;
  42. }
  43. }
  44.  
Success #stdin #stdout 0s 16064KB
stdin
Standard input is empty
stdout

Standard output is empty