Maximum xor permutation

getting wrong answer in all test cases. I tried to dry it but it was working there but answer is always coming to be zero. Tell the error in the code

Just brute force the solution since 2^10 can be upto only 1024. So for particular number of one’s in a string , precompute the numbers formed with that number of one’s and then just find max xor among any three number with that particular number of one’s.

For better understanding , please do refer this -:
Comments are also added.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.

hii my ans is also wrong why?