Simple Observation Using Bit Manipulation
Intuition\n Describe your first thoughts on how to solve this problem. \n\n# Approach\n Describe your approach to solving the problem. \n\n# Complexity\n- Time 
# Intuition\n<!-- Describe your first thoughts on how to solve this problem. -->\n\n# Approach\n<!-- Describe your approach to solving the problem. -->\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```cpp []\nclass Solution {\npublic:\n    vector<int> minBitwiseArray(vector<int>& nums) {\n        vector<int> ans;\n        for (auto i : nums) {\n            if (i == 2) {\n                ans.push_back(-1);\n                continue;\n            }\n            for (int j = 1; j < 32; j++) {\n                if ((i>>j)&1==1)\n                    continue;\n                ans.push_back(i ^ (1 << (j - 1)));\n                break;\n            }\n        }\n        return ans;\n    }\n};\n```
['C++']