Hello Everyone, I came across the problem named CHOCPAIR. I tried to solve it but failed. I look at @tciitb’s solution. My idea is the same as his. Still, my solution wasn’t accepted. So I followed his code. But still, my code produces the wrong answer. Someone, Please help.
I don’t have much knowledge about C++, but you didn’t check if the value ‘b’ is present in the set.
Checking it yields TLE (which can be removed by using ‘printf’ and ‘scanf’). Most probably, ‘getitem’ returns a dump value if the key is not present in the set.