Is there any way to solve this question other than Inclusion-Exclusion? As this question is provided under Bitmasking, so there might be an easier way other than adding to answer if subset length is odd and subtracting if subset length is even
Another solution for not so easy maths
I don’t think any other solution exists, because of the constraints are too large. Inclusion-Exclusion is the easiest solution we can think of.
Hey Abhineet, as you are not responding to this thread, I am marking your doubt as Resolved for now. Re-open it if required.
Please mark your doubts as resolved in your course’s “Ask Doubt” section, when your doubt is resolved.