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 1177. Like Comparisons

Question about ' like ' parsing and apostrophe encoding
Posted by Mickkie 6 Jan 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
Posted by 🐱 Doan Tuan Anh 🐱 8 Oct 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.