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

Обсуждение задачи 1320. Разбиение графа

Test 6 is unfairly tricky (+)
Послано Dmitry 'Diman_YES' Kovalioff 12 сен 2004 16:37
If you get WA(6) just change

while NOT (EOF) do

to

while NOT (SeekEOF) do

and your program may get AC, as mine one (0.03 sec, 377 Kb on Pascal ;] )

I understand why it happens (the last line of input is empty), but really cannot understand why was such test included to the testset. IMHO, it is unfairly tricky...
Re: Test 6 is unfairly tricky (+)
Послано Vladimir Yakovlev (USU) 12 сен 2004 17:38
If you read numbers with function read(), then after last numbers read CR/LF symbols still remain in input stream, so eof() returns false, because it's really not the end of file.
In the test #6 I don't see any empty lines or something tricky.
But why after changing EOF to SeekEOF my program got AC? I can send you my code (-)
Послано Dmitry 'Diman_YES' Kovalioff 12 сен 2004 17:44
it is true.
Послано Aleksey (BMSTU IU7) 26 сен 2004 03:30
Thanks.
My program crash on test #6
I just have changed:
while NOT (EOF) do begin  read(a,b); ... to
while NOT (SeekEOF) do begin  read(a,b); ...
and i've got AC!