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

Common Board

Problem 1099 !
Posted by Tran Nam Trung (trungduck@yahoo.com) 14 May 2001 15:51
Is there anybody use the perfect method to solve this
problem (not approximate method) ?
0.03 sec, 262 kb memory use. Who is better? Michael Mirzayanov &
Posted by SaratovSU #3 14 May 2001 17:32
Better ... and not better
Posted by Petko Minkov 14 May 2001 22:06
I'm better on memory - it was something like 66 kb .. it
runs on BC++ 3.1 for DOS.

I'm not better on time - i am two times slower then 0.03 ..
not sure, but slower. But i can speed it up probably! :))
Re: Better ... and not better
Posted by Mirzayanov Michael 15 May 2001 18:53
It use about 50kb if I use Borland Pascal 7.0 :)
...I think we have equivalent solution.
Re: Better ... and not better
Posted by Petko Minkov 18 May 2001 17:45
Do you use algorithm which finds augmenting path
(alternating path, i'm not sure bout the terminology here)
and updates the flow?

This one is only for bipartite graphs, but runs on
these test cases.
Re: You mean all the test cases is bipartite graphs (not general graphs), don't you ?
Posted by Tran Nam Trung (trungduck@yahoo.com) 19 May 2001 10:01
> Do you use algorithm which finds augmenting path
> (alternating path, i'm not sure bout the terminology here)
> and updates the flow?
>
> This one is only for bipartite graphs, but runs on
> these test cases.
>
Re: You mean all the test cases is bipartite graphs (not general graphs), don't you ?
Posted by Petko Minkov 19 May 2001 17:04
Nope, they're general graph all. But the algorithm is
still working, probably the test cases are random made,
and it's not failing to find the matching.

But Jivko Ganev is using general graph matching algorithm.
Re: You mean all the test cases is bipartite graphs (not general graphs), don't you ?
Posted by Jivko Ganev 19 May 2001 17:19
This is not supposed to be. I have created around 50 test
cases and have sent them to mb. In all of them the
bipartite algorithm fails. There is also a good amount of
them where Petko Minkov's randomized solution fails too. It
took my computer whole night to generate them, so as soon
they are uploaded I hope the greedy solutions will be
rejected.
Re: Better ... and not better
Posted by Mirzayanov Michael 21 May 2001 14:19
Yes, I find augmenting path. It works not only on bipartite graphs. I can prove it. Send to me: chestiphar@mail.ru your mail. If I will have a time (now I have a session) I'll write you.
mine takes 0.03 sec, 250 kb memory use. Is it better than yours ;)
Posted by Dinh Quang Hiep (mg9h@yahoo.com) 24 May 2001 12:18
QH@