DSU problem

Revision en2, by abdallahmontaser, 2021-10-22 21:08:10

https://codeforces.com/edu/course/2/lesson/7/1/practice/contest/289390/problem/C

in this problem if i used path compression get wrong answer and accept without path compression can any one explain why

this code that get wrong answer https://codeforces.com/edu/course/2/lesson/7/1/practice/contest/289390/submission/132622662

this code that get accept https://codeforces.com/edu/course/2/lesson/7/1/practice/contest/289390/submission/132624996

If you could give an test , that would be great

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English abdallahmontaser 2021-10-22 21:08:10 159
en1 English abdallahmontaser 2021-10-22 21:06:14 370 Initial revision (published)