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

Обсуждение задачи 1567. SMS-спам

Something is wrong with this problem!!!
Послано Varduhy 9 фев 2008 20:56


Edited by author 12.02.2008 22:20
Re: Something is wrong with this problem!!!
Послано CHIDEMYAN SERGEY 11 фев 2008 02:22
Try such test:
pokupaite gvozdi tolko v kompanii gvozdederov i tovarischi!#9654

My AC program output:119
Your program output:113
Good luck!
Re: Something is wrong with this problem!!!
Послано Varduhy 12 фев 2008 19:08


Edited by author 12.02.2008 22:20
Re: Something is wrong with this problem!!!
Послано CHIDEMYAN SERGEY 12 фев 2008 20:45
Maybe cin.getline() works uncorrectly.
Try such way:
[code deleted]
and you'll get AC.


Edited by author 13.02.2008 18:36
Re: I finally got AC!!!
Послано Varduhy 12 фев 2008 22:18
Thank you very much, as while studying your solution I understood what was wrong with my program! My program readed only one line! But yours could read more.
I changed  mine :
from
cin.getline(a,1000)
...

to
while(cin.getline(a,1000))
{
...
}
and got AC!

There is a wrong sentence in the text of the problem:
"The single line of input contains the slogan. "
"The single" had made me think that way.

So thank you one more time! :)