C++ bitwise solution
\nstatic bool fastIO = []()\n{\n    std::cin.tie(0)->sync_with_stdio(false);\n    return true;\n}();\n\nclass Solution\n{\npublic:\n    vector<int> minBitwiseAr
```\nstatic bool fastIO = []()\n{\n    std::cin.tie(0)->sync_with_stdio(false);\n    return true;\n}();\n\nclass Solution\n{\npublic:\n    vector<int> minBitwiseArray(vector<int>& nums)\n    {\n        std::vector<int> res(nums.size(), -1);\n        for (int i = 0; i < nums.size(); i++)\n        {\n            int count_trailing_1 = countTrailingZerosUntilBit0(nums[i]);\n            if (count_trailing_1 == 0)\n            {\n                continue;\n            }\n\n            res[i] = nums[i] & (~(1 << count_trailing_1 - 1));\n        }\n\n        return res;\n    }\nprivate:\n    int countTrailingZerosUntilBit0(int num)\n    {\n        int count = 0;\n        while (num & 1)\n        {\n            count++;\n            num >>= 1;\n        }\n        return count;\n    }\n};\n```
['C++']