_Halim_'s blog

By _Halim_, history, 7 years ago, In English

I was trying to solve this problem in Egyptian ECPC but I couldn't. Can anyone give me a hint ?

someone who already solved it said that he use disjoint set but I couldn't handle it using disjoint set .

  • Vote: I like it
  • 0
  • Vote: I do not like it

| Write comment?
»
7 years ago, # |
Rev. 4   Vote: I like it +3 Vote: I do not like it

The problem is asking for the maximum spanning tree of the graph where the edge costs between any two numbers in the array is their gcd.

Solution