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

Обсуждение задачи 1344. Репка

Report of the wrong test data 8 (+)
Послано Safe Bird 26 фев 2005 18:59
I did so in the program:

void GoWrong()
{
 int a = 0;
 fprintf(Fou,"%d",1/a);
}

for (i=1; i<=n; i++)
 fscanf(Fin,"%*d %d %d %d", p[i], p[i]+1, p[i]+2);
for (i=1; i<=n; i++) for (j=0; j<3; j++) if (p[i][j]>0)
 if ( p[p[i][j]][0]!=i && p[p[i][j]][1]!=i && p[p[i][j]][2]!=i ) GoWrong();

and i really got RE(divided by 0). I think such testcase is illeagle. BTW if I use "if n=9 then writeln('2.0000')" I'll get AC.
Fixed (+)
Послано Vladimir Yakovlev (USU) 27 фев 2005 18:11
There was an error in input of test 8.
I fixed it. Your first submit is AC now.
:)thanx (-)
Послано Safe Bird 27 фев 2005 20:11


Edited by author 03.03.2006 17:38
Are tests OK now?
Послано Michael Rybak (accepted@ukr.net) 2 мар 2006 21:06
I have exactly the same problem on test 20. I figured out (with binary search on what assertions failed) that some rope isn't matched, and after that I read your message, and, just for the sake of being precise, rewrote my code in the following way, copypasting from yours:

#define ASSERT(x) if (!(x)) while (1) cout << 1;else 1

...

int t[1000][4];
int n;

int main()
{
  int i, j;
  cin >> n;
  for (i=1; i<=n; i++)
    scanf("%*d %d %d %d", t[i], t[i]+1, t[i]+2);
  for (i=1; i<=n; i++) for (j=0; j<3; j++) if (t[i][j]>0)
    if ( t[t[i][j]][0]!=i && t[t[i][j]][1]!=i && t[t[i][j]][2]!=i )
      ASSERT(false);

...
}

This code gets Output Limit Exceeded on test 20. Replacing ASSERT(false) with ASSERT(true) in that line makes it get Crash at test 20, which means this exact assertion has failed.

Admins, please clarify.

[EDITED BY RYBAK]
The story looks very similar. Instead of ASSERT(false) I wrote:

    {
      cout << "1.0000";
      return 0;
    }

and got AC. Still I wonder how everyone else treat such situation?


Safe Bird писал(a) 27 февраля 2005 20:11

Edited by author 02.03.2006 21:15
Yes, test 20 is wrong!
Послано Walrus 21 июл 2006 00:55
Judges, pls correct test 20!
Послано TO THE TOP 17 мар 2008 16:30
People must have a chance to AC this problem not reading forum before ))
Re: Judges, pls correct test 20!
Послано Vedernikoff Sergey 17 мар 2008 22:00
I think, tests were corrected - I've ACed the problem without reading forum =)
Re: Judges, pls correct test 20!
Послано TO THE TOP 18 мар 2008 17:07
It doesn't mean anything. In 20 test there is a block A, which connected to block B, but block B doesn't connect to block A.