391 - Mark-up

All about problems in Volume 3. If there is a thread about your problem, please use it. If not, create one with its number in the subject.

Moderator: Board moderators

brianfry713
Guru
Posts: 5947
Joined: Thu Sep 01, 2011 9:09 am
Location: San Jose, CA, USA

Re: MarkUp 391

Post by brianfry713 »

For input: \**\\***\\*\*\*

\* [mark up off]
*\ [the \ is printed since mark up is off, only \* will turn markup on]
\* [mark up on]
**
\\ [this becomes \]
*
\* [mark up off]
\* [mark up on]

output *\**\*


For input:
\*
\\

Output should be:

\\

There is only one test case, the state of markups on/off should be remembered across lines.
Check input and AC output for thousands of problems on uDebug!

uDebug
A great helper
Posts: 475
Joined: Tue Jul 24, 2012 4:23 pm

Re: MarkUp 391

Post by uDebug »

brianfry713,
Thanks very much for the careful explanation and great test case.

I have a question on this part

\\ [this becomes \]
*


When the

\\

becomes a

\

and is then followed by a

*

Shouldn't that toggle the mark up to off? Because, in fact, we encountered the sequence

\*

Or am I missing something?

Edit: Unless, if you're outputting a

\

then it doesn't count as being part of the

\*

signal - and so that's why the

*

is just output after the

\
Check input and AC output for over 7,500 problems on uDebug!

Find us on Facebook. Follow us on Twitter.

Post Reply

Return to “Volume 3 (300-399)”