Easy C++ Solution
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    {\n        \n        vector<int>a;\n       \n        for(int i=0;i<nums.size();i++)\n        {\n            bool x = false;\n            int m = 0;\n            int n = 1;\n            while(m<=nums[i] && n<=nums[i])\n            {\n                int z = m|n;\n                if(z==nums[i])\n                {\n                     a.push_back(m);\n                     x = true;\n                     break;\n                }\n                m++;\n                n++;\n                  \n            }\n            if(!x)\n            a.push_back(-1);\n            \n        }\n        return a;\n    }\n};\n```
['C++']