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

Обсуждение задачи 1345. HTML

I have two interesting questions...
Послано Safe Bird 26 фев 2005 12:06
If there's a line " if a<b .." in the pascal source file, how to avoid the conflict between '<' in string and '<' in HTML command?

how about:
writeln('1232134{32q421}');
will "{}" be considered as comment?
I have two interesting answers :) (+)
Послано Dmitry 'Diman_YES' Kovalioff 26 фев 2005 12:20
>If there's a line " if a<b .." in the pascal source file, how to avoid the conflict between '<' in string and '<' in HTML command?

Don't worry about it :)

>how about:
>writeln('1232134{32q421}');
>will "{}" be considered as comment?

No. You should output:
writeln(<span class=string>'1232134{32q421}'</span>);

P.S. The problem definition is unclear. While solving it I had some questions like:
- what about "a:=1.23E10"?
- what about "s:=#123#123"?
and so on. But it appeared you should not pay special attention to these test cases. The best way to solve this problem is finite automaton - just build it carefully.

P.P.S. You have solved Ural-1340 "Cucaracha". My congratulations :)

Edited by author 26.02.2005 12:22
Re: I have two interesting answers :) (+)
Послано Love_xx 26 фев 2005 12:51
Thanx:)

I used something just like finite automaton.
my friends told me that the input file might not be a correct pascal file. I asked him the following tests:

his answer is in (). are these all right?

#  (#)
#123445.53656     ( <s>#123445</s>.<s>53656</s> )
{1234{252}32452}  ( <s>{1234{252}</s><s num>32452</s>} )
23423.525.2345    ( <s>23423.525</s>.<s>2345</s> )
.62345654         ( .<s>62345654</s> )
{134234//23421434 } 2134234}    ( <s com>{134234//23421434 }</s> <s num>2134234</s>} )
//432523{54325}5432534  ( <s com>//432523{54325}5432534</s> )
BTW i'm using this ID "Love_xx" to test out the test datas :(
Послано Safe Bird 26 фев 2005 12:55
Aha, you're quite right. I made a silly mistake!
Послано Safe Bird 26 фев 2005 13:16
 and there's no need to pay attantion to such messy input.
ACed :D
Послано Safe Bird 26 фев 2005 13:16
Congratulations (-)
Послано Dmitry 'Diman_YES' Kovalioff 26 фев 2005 13:22
Re: I have two interesting answers :) (+)
Послано TagirovArthur 8 апр 2005 21:12
how about:
6472{34123}2314

<span class=number>6472</span><span class=comment>{34123}</span><span class=number>2314</span>
or
<span class=number>6472<span class=comment>{34123}</span>2314</span>
?
The first one is correct (-)
Послано Dmitry 'Diman_YES' Kovalioff 9 апр 2005 12:02
I have answers :)
Послано TagirovArthur 12 апр 2005 18:24
how about:
#13#14
#$2b
s := #97#98+#$56#98;
#24>#89
My AC program's output (+)
Послано Dmitry 'Diman_YES' Kovalioff 12 апр 2005 20:53
<span class=string>#13</span><span class=string>#14</span>
<span class=string>#</span>$<span class=number>2</span>b
s := <span class=string>#97</span><span class=string>#98</span>+<span class=string>#</span>$<span class=number>56</span><span class=string>#98</span>;
<span class=string>#24</span>><span class=string>#89</span>

Edited by author 25.06.2005 17:44
Re: My AC program's output (+)
Послано WinTokk 30 сен 2005 15:21
Hello Dmitry!

I think your answer is incorrect according to this sentence-
Or a symbol “#” which is followed by nonempty sequence of digits.

My AC program's output:

<span class=string>#13</span><span class=string>#14</span>
#$<span class=number>2</span>b
s := <span class=string>#97</span><span class=string>#98</span>+#$<span class=number>56</span><span class=string>#98</span>;
<span class=string>#24</span>><span class=string>#89</span>