Maximise XOR- CodeChef Long 2022 solution