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

Обсуждение задачи 1018. Двоичная яблоня

When a branch contains 0 apples...
Послано RightAnswer 31 июл 2001 15:35
I've found that when there is a branch containing
0 apples, both Lintao's program and the judge-data
think it's not a branch, so the tree may be smaller
than n nodes; and the result is calculated from taking away
n-q-1 branches from this smaller tree, not from preserving
q branches.
It's a quite subtle error. :)
You are RightAnswer. I agree with you.
> I've found that when there is a branch containing
> 0 apples, both Lintao's program and the judge-data
> think it's not a branch, so the tree may be smaller
> than n nodes; and the result is calculated from taking
away
> n-q-1 branches from this smaller tree, not from
preserving
> q branches.
> It's a quite subtle error. :)
>
Why does this happen?
Послано AOY++ 12 авг 2001 13:41
> I've found that when there is a branch containing
> 0 apples, both Lintao's program and the judge-data
> think it's not a branch, so the tree may be smaller
> than n nodes; and the result is calculated from taking
away
> n-q-1 branches from this smaller tree, not from
preserving
> q branches.
> It's a quite subtle error. :)
>

My program just had an "accepted". But I think the judge-
program is wrong.