Maria386's blog

By Maria386, history, 8 hours ago, In English

296040082 Can anyone help me and tell me where in this code or perhaps this solution to question 1081D is wrong?

  • Vote: I like it
  • -5
  • Vote: I do not like it

»
7 hours ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

I think you should check your DSU functions. Especially your merge function. You are returning type "bool", but you are using it as "void". Also, this solution to this question can lead to TLE.(if im wrong then sorry, I just did a rough version of your idea and I got TLE)

  • »
    »
    7 hours ago, # ^ |
    Rev. 6   Vote: I like it 0 Vote: I do not like it

    Thank you

    Yes, I actually copied the code I had written earlier for DSU and did not convert bool to void.

    I think I have found my main mistake.

    Anyway, I am an idiot for posting a blog so quickly after a question has not been solved!