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

Обсуждение задачи 1237. Evacuation Plan

Any tips on solving this problem?
Послано Sap 19 май 2010 21:40
hi,

im trying to solve this problem and would like to get tips in the right direction of solving this problem.

would a grapha matching solution work? or perhaps a minimum cost flow solution? or anything else?

thanks in advance.
Re: Any tips on solving this problem?
Послано SkorKNURE 6 окт 2010 15:12
My solution is to find really optimal matching with min-cost max-flow. Then compare it to one from input.
Re: Any tips on solving this problem?
Послано Tolstobrov Anatoliy[Ivanovo SPU] 4 май 2017 04:08
I solved it with negative cycle searching.

My algo have following complexity: (N+M)*(2*N*M + M*M)
Re: Any tips on solving this problem?
Послано Harkonnen 14 авг 2022 22:22
It can also be a chain ending up in shelter with residue capacity.

It is also possible to make it N*M*M + M*M*M by jumping from shelter to shelter through one preselected building which grants maximum yield for that pair of shelters (hence the first N*M*M step), M*M*M is Bellman-Ford.