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

Обсуждение задачи 1069. Код Прюфера

help??? tests???
Послано marius dumitran 13 окт 2006 04:06
i have tried this problem several years....while preparing for contests and it's always WA and it's not at all the heardest of problems.....
i made an O (n log n) alg using heaps ....as usual
it's WA at test 2

could someone put some tests around??? i ageve my self some and nothing....bad
could somebody explain why??????????????:
1 2 3 2 3
my result:
1: 2 4
2: 1 3 6
3: 2 5
4: 1
5: 3
6: 2
AC result:
1: 2 4
2: 1 3 6
3: 2 5
4: 1
5: 1  //5 is not even conected to 1???????
6: 3




Edited by author 13.10.2006 04:08

Edited by author 13.10.2006 04:40
Re: help??? tests???
Послано ChBlossom 20 сен 2007 17:07
Is this input legal?
It seems that the last number will always be N, or the sequence itself is not legal.
Re: help??? tests???
Послано Ulugbek#& 13 июн 2020 10:13
It's incorrect input, you cannot find a tree that satisfies your input
marius dumitran писал(a) 13 октября 2006 04:06
i have tried this problem several years....while preparing for contests and it's always WA and it's not at all the heardest of problems.....
i made an O (n log n) alg using heaps ....as usual
it's WA at test 2

could someone put some tests around??? i ageve my self some and nothing....bad
could somebody explain why??????????????:
1 2 3 2 3
my result:
1: 2 4
2: 1 3 6
3: 2 5
4: 1
5: 3
6: 2
AC result:
1: 2 4
2: 1 3 6
3: 2 5
4: 1
5: 1  //5 is not even conected to 1???????
6: 3




Edited by author 13.10.2006 04:08

Edited by author 13.10.2006 04:40