ENG  RUSTimus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
вернуться в форум

Обсуждение задачи 1038. Проверка орфографии

To All Those Who are getting WA #3
Послано Varun Sharma 7 май 2009 17:31
Hi,

When you read the input, don't just concatenate all into one string. For example:-

If the input is

asasa.!sds
sdsdsd!!!..::dsd

Then, you should have a final string which is like this:-

asasa.!sds sdsdsd!!!..::dsd

and not like this

asasa.!sdssdsdsd!!!..::dsd (this is wrong and will screw up)

There should be a space between the two lines which you are reading and concatenating !
Re: To All Those Who are getting WA #3
Послано mirsaid_mir 21 июн 2011 23:25
Thank you very much!!!
Re: To All Those Who are getting WA #3
Послано Artem Khizha [DNU] 22 июл 2011 15:27
Well, I've got another stupid mistake with WA#3, you could detect it with test "aB" (answer is 2).

Btw, in this problem one might consider reading a whole input at once. In C/C++ such reading might look like below:
>   FILE *source = stdin;
>   fseek(source, 0, SEEK_END);
>   long textLength = ftell(source);
>   rewind(source);
>   char* text = (char*)malloc(sizeof(char)*textLength);
>   fread(text,1,textLength,source);