Блог пользователя Maria386

Автор Maria386, история, 12 часов назад, По-английски

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

  • Проголосовать: нравится
  • -5
  • Проголосовать: не нравится

»
10 часов назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

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)

  • »
    »
    10 часов назад, # ^ |
    Rev. 6   Проголосовать: нравится 0 Проголосовать: не нравится

    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!