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

Обсуждение задачи 1508. Японский кроссворд

To Admin: There must be something wrong in the testcase!
Послано Amber [Is it snowy?] 1 ноя 2006 12:17
In the description of input, "The second line contains K integers". If K = 0, the second should be empty line.
But in Sample input #2
9 0
??????.X?

There is not so-called second line.
So I read data like following. and got WA at 3.
----------------
Readln(N, M);
if M > 0 then
begin
    for i := 1 to M do
        Read(L[i]);
    Readln;
end;
for i := 1 to N do
    Read(T[i]);
----------------

Then I suppose sample input #2 is wrong, there must be an empty line in second line when K = 0.
I change code like following. and got WA at 20.
----------------
Readln(N, M);
for i := 1 to M do
    Read(L[i]);
Readln;
for i := 1 to N do
    Read(T[i]);
----------------

It implys there is some invalid char in input file.
So I change code like following. and got AC.

Readln(N, M);
for i := 1 to M do
    Read(L[i]);
for i := 1 to N do
    repeat
        Read(T[i]);
    until T[i] in ['X', '.', '?'];

So there must be something wrong in testcase.
Re: To Admin: There must be something wrong in the testcase!
Послано Vladimir Yakovlev (USU) 1 ноя 2006 13:26
There was a bug in sample output #2. Tests are correct.