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

can ascii 39 (single apostrophe) appear inside string or template?
Posted by Radi Muhammad Reza 13 Nov 2011 12:54
what is meant by:

'Inner entrance of apostrophe symbol (ASCII 39) into string or template is encoded by double apostrophe symbol' ?

does it mean we have to parse this way even when 39 is encountered? or 39 can't appear ?

i take input like:
string dummy;
unsigned char ch;
cin>>ch;
while(cin>>ch&&ch!=39){
       ........
}
cin>>dummy;
while(cin>>ch&&ch!=39){
       ........
}

but this gets me WA #1

when i include this:
if(dummy!="like") while(true);

this gets me TLE #1

i don't know what's going wrong !

please help me. thanks in advance.
Re: can ascii 39 (single apostrophe) appear inside string or template?
Posted by Radi Muhammad Reza 13 Nov 2011 22:30
the problem statement is wrong or at least the english is :(

my assumption that 39 may appear was correct and got ac finally. The reason why char gets ac is 128 to 255 are mapped to unique negative values. so unsigned not needed :)