I have made a video discussing the solution for the problem Chef and Bitwise Product under May long challenge 2020. I hope it helps you understand the solution.
If you have any doubts regarding the video and this problem, please do post them here.
- Video Link - https://youtu.be/Gl_TaxBlE7A
- Problem Link - https://www.codechef.com/MAY20A/problems/CHANDF/
- Code Link - https://www.codechef.com/viewsolution/32980510