The "No" was meant to "which I think uses this Union find mechanism.". Those Set classes allows you to insert, delete or find in an efficient way, mas not merging which is what this problem is really about.
On Sep 8, 9:49 am, Miguel Oliveira <mr.miguel.olive...@gmail.com> wrote: > No. You have to write the code yourself. If you understand the code. > You'll be able to write it from scratch easily ;) > Checkhttp://en.wikipedia.org/wiki/Disjoint-set_data_structure > > On Sep 8, 12:51 am, Satyajit Malugu <malugu.satya...@gmail.com> wrote: > > > > I think that it's harder to do it that way. Do you know how to do > > > those set merge operations efficiently? > > > From the contest analysis its union find (graph operation) Set operations > > can be done efficiently in C++ STL sets or java Set which I think uses this > > Union find mechanism. > > > I will try to code it and see. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "google-codejam" group. To post to this group, send email to google-code@googlegroups.com To unsubscribe from this group, send email to google-code+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/google-code?hl=en -~----------~----~----~----~------~----~------~--~---