|
|
вернуться в форумWA on test 1, writen in C, STL 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 Nice solution :) Try such test: .test Re: WA on test 1, writen in C, STL Thank you! Silly mistake, now accepted. |
|
|