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

Обсуждение задачи 2132. Разбиение графа. Версия 2

Hint
Послано Mickkie 29 май 2020 00:50
This problem is easier than rating should be if you know the trick.

Invariant: graph G is decomposable if and only if all the connected components of G has even number of edges.

A tree is very easy to be decomposed. Creating a tree equivalent to each connected component will lead to the answer.

Hope this help, Mick :)
Re: Hint
Послано bsu.mmf.team 30 дек 2020 19:37
It helped me a lot, thank you!
I read a proof of the fact that any connected graph with even number of edges is decomposable, but it was quite complicated and didn't allude at any good algorithm underneath.
Your idea is much simpler and easier to proof