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

Обсуждение задачи 1102. Странный диалог

Please help WA#1
Послано Nisarg Shah 30 дек 2008 18:50
I used getc and the idea of finite automaton to solve this problem and my program is working fine on the sample test case as well as all test cases given in thread.
Still I am getting WA#1. I know it is not same as sample case.
Please give me some good test from case 1.
Thanks.
Re: Please help WA#1
Послано Nisarg Shah 31 дек 2008 14:37
I have used getc(stdin), but if I give input from file by <<, I have to put an extra getc(stdin), whereas if I write it on command prompt, that is not required. Why is this so? Why input from file has an extra character at end of line?
Re: Please help WA#1
Послано Taras Vasylyshyn 5 янв 2010 23:39
I thought that in the end of n-th line it is EOF. But this line finishes by '\n' similarly as another lines. That's why I got WA#1.