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

Обсуждение задачи 1177. Сопоставление с шаблоном

Question about ' like ' parsing and apostrophe encoding
Послано Mickkie 6 янв 2016 15:33
How to deal with case like this
' ' like ' like ' like ' like ' 'like '
it can be splitted as
( ) & ( like ' like ' like ' 'like ) or
( ' like ) & ( like ' like ' 'like ) or
( ' like ' like ) & ( like ' 'like ) or
( ' like ' like ' like ) & ( 'like )

Can you clarify this statement
Inner entrance of apostrophe symbol (ASCII 39) into string or template is encoded by double apostrophe symbol

And if it's true the case
''hi'' like ''hi''
will be changed to
'"hi'' like '"hi'
Am I right?

Then how is this case possible?
'''''' like '_'''
Re: Question about ' like ' parsing and apostrophe encoding
Послано 🐱 Doan Tuan Anh 🐱 8 окт 2017 07:07
The apostrophe symbol (ASCII 39) if appear in string or template will be double (now it becomes 2 successive apostrophe symbols).

The English problem statement is wrong to me since it made us think that ASCII 39 is replaced by ASCII 34 or something. But in fact, ASCII 39 is replaced by two ASCII 39.

At least, I got AC after using my above interpretation.