How to solve this problem using DSU?

Revision en1, by zzzzsust19, 2022-12-13 04:19:13

I solved this problem, Odd-Even Subsequence using binary search. But I also saw the tag DSU. I went for the tutorial but there is only the binary search approach. I am having a hard time connecting this problem to DSU. Can anybody explain how to solve this using DSU

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English zzzzsust19 2022-12-13 04:19:13 351 Initial revision (published)