ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1297. Palindrome

I got Compilation Error in PALINDROME Problem....HELP!!!!!
Posted by Mindanao 17 Jun 2011 21:02
Here's my code that runs well on my PC.

#include<iostream>
#include<algorithm>

using namespace std;
main()
{
      string txt;
      string txtRev;
      string tmp;
      int i;
      int com;
      while(cin>>txt){
      i=0;
      do{
        for (int n=i+2;n<txt.length();n++){
            tmp=txt.substr(i,n);
            txtRev=tmp;
            reverse(txtRev.begin(),txtRev.end());
            com= txtRev.compare(tmp);
         if (com==0) break;
         }
         i++;
      }while (com!=0);
      cout<< tmp <<" " <<endl;
      }
}
Re: I got Compilation Error in PALINDROME Problem....HELP!!!!!
Posted by Putilin Andrey [Barnaul] 14 Sep 2011 16:25
#include <string>