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 1226. esreveR redrO

WA on test 1, writen in C, STL
Posted by Michael Medvedev 5 Oct 2006 01:26
I wrote very simple solution, but WA on test 1.
Can smb tell me how to change a program?
Thanks.

#include <cstdio>
#include <string>
#include <algorithm>
using namespace std;

char s[256];

void main(void)
{
  scanf("%[^a-zA-Z]",s);
  while(scanf("%[a-zA-Z]",s)==1)
  {
    reverse(s,s+strlen(s));printf("%s",s);
    scanf("%[^a-zA-Z]",s);printf("%s",s);
  }
}

Edited by author 05.10.2006 01:27
Re: WA on test 1, writen in C, STL
Posted by Burunduk1 5 Oct 2006 11:51
Nice solution :)
Try such test: .test
Re: WA on test 1, writen in C, STL
Posted by Michael Medvedev 8 Oct 2006 02:26
Thank you!
Silly mistake, now accepted.