_Halim_'s blog

By _Halim_, history, 7 months 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 .

 
 
 
 

»
7 months 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
  • »
    »
    7 months ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    thank you i really appreciate your help