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 1872. Spacious Office

Show all messages Hide all messages

Fast solution Alexey Prokopnev 6 Apr 2013 16:41
For solving this problem I used advanced bipartite graph theory. But it work slowly(about 0.6sec). Very interesting how solve more quickly. Please, give me some hints.(My e-mail: scarlet.flower@list.ru)
Re: Fast solution Серовиков Андрей 8 Apr 2013 19:39
Maximum matchings in bipartite graph is almost enough to solve it + some "magic" :)
Maybe maximum flow algos' works better here...
My complexity was O(V*E), 0.3sec
Re: Fast solution Kungurtsev`` 3 Sep 2013 18:48
Just gredy.
Re: Fast solution Alexey Dergunov [Samara SAU] 6 Sep 2013 11:55
Also, O(NlogN) solution exists