Saif_Qaher's blog

By Saif_Qaher, 10 years ago, In English

here it is

How to solve it with Disjoint Data Structure .

thanks .

UPDATE : any help , i can't get the idea.

  • Vote: I like it
  • +3
  • Vote: I do not like it

»
10 years ago, # |
  Vote: I like it 0 Vote: I do not like it

Why do you need disjoint set algorithm for the problem? The constraints are incredibly small so you could just simulate the process, year by year?

  • »
    »
    10 years ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    Why do it the easy way? :P

  • »
    »
    10 years ago, # ^ |
      Vote: I like it +4 Vote: I do not like it

    I want to know how to use disjoint here.

  • »
    »
    10 years ago, # ^ |
      Vote: I like it +3 Vote: I do not like it

    Because it has tagged in Disjoint set problem in CP3 by Steven Halim :)

    • »
      »
      »
      10 years ago, # ^ |
        Vote: I like it +3 Vote: I do not like it

      Yes exactly , i wandered why they but it there .