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 1050. Preparing an Article

What is the blank line?
Posted by btas 13 Aug 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?
Posted by Oleg Baskakov 13 Aug 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?
Posted by btas 13 Aug 2016 09:57
Thank you!
Re: What is the blank line?
Posted by btas 13 Aug 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?
Posted by Oleg Baskakov 13 Aug 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?
Posted by btas 13 Aug 2016 14:59
Thank you! [2]