ENG  RUSTimus Online Judge
Online Judge
Problems
Authors
Online contests
About Online Judge
Frequently asked questions
Site news
Webboard
Links
Problem set
Submit solution
Judge status
Guide
Register
Update your info
Authors ranklist
Current contest
Scheduled contests
Past contests
Rules
back to board

Discussion of Problem 1109. Conference

Minimum vertex cover
Posted by Mahilewets 4 Jun 2017 19:26
Find maximal matching using Kuhn algo.  Then greedily add missing connections.
That is slow way.
My C++ solution without any STL use runs in 230-240 ms.
Re: Minimum vertex cover
Posted by Mahilewets 5 Jun 2017 00:16
I found how to speed it up.
Just use any stupid greedy algorithm to build some initial matching.
After that apply Kuhn algo.
Running time dramatically dropped to 31 ms in my case.

Edited by author 05.06.2017 00:17