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. char s[100005];
  28. int i,l;
  29. for(i=0;i<10000007;i++){
  30. gets(s);
  31. vector<char>a;
  32. vector<char>b;
  33. if(strcmp(s,"DONE")==0)return 0;
  34. l=strlen(s);
  35. for(i=0;i<l;i++){
  36. if(s[i]>='A' && s[i]<='Z') s[i]+=32;
  37. if(s[i]>='a' && s[i]<='z') a.push_back(s[i]);
  38. }
  39. b=a;
  40. reverse(b.begin(),b.end());
  41. if(a==b)cout<<"You won't be eaten!"<<endl;
  42. else cout<<"Uh oh.."<<endl;
  43. }
  44. }
  45.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp: In function ‘int main()’:
prog.cpp:30:23: error: ‘gets’ was not declared in this scope
                 gets(s);
                       ^
stdout
Standard output is empty