M.A.H.M.O.O.D's blog

By M.A.H.M.O.O.D, history, 8 years ago, In English

Hi everyone.

I can't solve this problem I have tried so much can you please tell me what's wrong with my code I keep getting WA on 42.

456E - Civilization

19871836

Thanks in advance and have a nice day.

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

»
8 years ago, # |
  Vote: I like it +1 Vote: I do not like it

Replace dsu[b] = findd(a) by dsu[findd(b)] = findd(a).

http://mirror.codeforces.com/contest/456/submission/19875935

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

    Thank you very much man you really have no idea how much this means to me for someone to debug my messy code.

    again thank you and have a wonderful day.

    :)