Sponsored
Sponsored
Use these hints if you're stuck. Try solving on your own first.
Think of each bit separately, i.e. try to figure out if <code>i<sup>th</sup></code> bit is set in the answer.
<code>i<sup>th</sup></code> bit is set in the answer if it's set in one of the array elements or it can be made using some of them.
Try to sum up lower bits and make higher bits.