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

Обсуждение задачи 1050. Подготавливая статью

What is the blank line?
Послано btas 13 авг 2016 00:20
Hi
"Paragraph ends in the source text are marked either by at least one blank line, or a \par command or both."
What is the blank line? '\n'? Or some space symbol which ends with '\n'?


Edited by author 13.08.2016 00:25

Edited by author 13.08.2016 00:26
Re: What is the blank line?
Послано Oleg Baskakov 13 авг 2016 00:59
Blank line is the 3rd line in example input, no spaces or other symbols. I suppose you're confused by looking at the input after highlighting it, but there are really no spaces there, it's just highlighting works that way.
Re: What is the blank line?
Послано btas 13 авг 2016 09:57
Thank you!
Re: What is the blank line?
Послано btas 13 авг 2016 10:25
But how can I detect it in C++? I tried '\n', '\r' and  "\n\r\r" but i have WA#3 :(
Re: What is the blank line?
Послано Oleg Baskakov 13 авг 2016 12:45
I had WA3 because i forgot that after \endinput (not only after \par or blank line) i should check if there's an extra quote to be removed in that paragraph. Maybe that will help you.

As about your question, i'm not really good at C++, but maybe i can suggest http://linux.die.net/man/3/getline or something. And if that line is of length 0, then it's blank.
Re: What is the blank line?
Послано btas 13 авг 2016 14:59
Thank you! [2]