ENG
RUS
Timus Online Judge
Online Judge
Задачи
Авторы
Соревнования
О системе
Часто задаваемые вопросы
Новости сайта
Форум
Ссылки
Архив задач
Отправить на проверку
Состояние проверки
Руководство
Регистрация
Исправить данные
Рейтинг авторов
Текущее соревнование
Расписание
Прошедшие соревнования
Правила
Обсуждение задачи
2055
. Урбанистика
Показать все ветки
Спрятать все ветки
Показать все сообщения
Спрятать все сообщения
WA #4
Spatarel Dan Constantin
2055
. Урбанистика
29 апр 2021 16:30
2
WA #4
Spatarel Dan Constantin
22 окт 2018 23:39
input:
5 5
1 2 0
2 3 1
2 4 1
3 4 1
4 5 2
one possible output:
1 2 3 5
wrong output:
1 2 3 4 5
Don't forget that the output also needs to have as few edges as possible!
Re: WA #4
Vit Demidenko
29 апр 2021 16:30
Obviously, size of answer is always n-1
Is there any easier solution?
Mickkie
2055
. Урбанистика
2 ноя 2015 10:28
3
Is there any easier solution?
Mickkie
28 июн 2015 19:35
One way I can think of is to sort edge by cost
and use dynamic connectivity
But it's very hard to implement :(
What's the better solution?
Re: Is there any easier solution?
G.D.Rtop
10 авг 2015 05:55
divide and conquer is ok. but i can't understand now .And i get T with dynamic connectivity.
Mickkie
писал(a) 28 июня 2015 19:35
One way I can think of is to sort edge by cost
and use dynamic connectivity
But it's very hard to implement :(
What's the better solution?
Re: Is there any easier solution?
Vit Demidenko
2 ноя 2015 10:28
Lucky one, I have TL with this method.
Новая тема
Вид форума:
плоский
|
древовидный
|
классический
Сортировка веток:
всплывающая
|
фиксированная
© 2000–2024
Timus Online Judge Team
. Все права защищены.