Getting WA for dsu problem.

Revision en1, by 2ndSequence, 2020-06-09 10:19:03

The problem should be really simple, i just need to find the connected component and each node represent an index of the array the sort the value of all indices and put them in the correct position, do the same for each component.

But i am getting WA test 16 for unknown reason i even checked all the small test cases and my code passed so hopefully someone can help..

Problem link : Here. Solution link : Here.

Thanks in advance.

Tags #dsu

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English 2ndSequence 2020-06-09 10:19:03 573 Initial revision (published)