Help needed on Codechef problem

Revision en1, by parth_15, 2017-09-19 13:27:55

Hello, I was solving a problem PROBLEMfrom this long challenge but my solution Solutionis not getting accepted. I have used 2 colouring graph method for vertices whose difference is 1 and DSU for vertices whose difference is 0. Please have a look at the solution and tell that is approach correct or not?

Tags codechef long, disjoint set, #unionfind

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English parth_15 2017-09-19 13:27:55 435 Initial revision (published)