Hi guys! Can you help me please with some problem I found recently? http://acm.timus.ru/problem.aspx?space=1&num=1099
I think it'a a maximum flow problem, but I can't figure out how to solve it. Some say something about Flower Trees, but I don't actually know what they are. Thanks in advance! :)
It's a maximum matching problem on a general graph. See Edmonds' Blossom algorithm
Thanks a lot! It's very helpfull. Do you also have some implementation of it?
The following is my implementation. https://github.com/boleynsu/acmicpc-codes/blob/master/archives/problemset/acm.timus.ru/1099.cpp
Thanks!