I was trying to solve this problem
however I was unable to understand the editorial to this problem.
Can someone please explain how to solve this problem using examples if possible ?
I am still unable to understand the sample output itself and what the question is asking exactly.
Thank you in advance :D :D
I think understanding the question and the sample output is the crucial first step. :) Knowing a bit of math usually taught at a university level would be helpful. If you don't have that, maybe try googling "set theory relations", hopefully a good tutorial or lesson will pop up.