MAXAND18: Partially Accepted

here is my solution for problem (https://www.codechef.com/LTIME85B/problems/MAXAND18)
solution:
https://www.codechef.com/viewsolution/34818478
Can anyone please find where my code breaks
@galencolin

You can refer to my solution here
I think you should set the value mp[ind] to something like -1 so that it will never be picked up. Setting it to 0 will cause bugs when the value of k is larger than the MSB of the largest number in the array.

1 Like

read

Thank you @galencolin!!