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

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

can ascii 39 (single apostrophe) appear inside string or template?
Послано Radi Muhammad Reza 13 ноя 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?
Послано Radi Muhammad Reza 13 ноя 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 :)