laziest brute force
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```rust []\n\nimpl Solution {\n  pub fn min_bitwise_array(nums: Vec<i32>) -> Vec<i32> {\n    // brute force\n    let mut res: Vec<i32> = vec![];\n    for n in nums {\n      // try all until sum goes over\n      let mut found = false;\n      for i in 0..n {\n        let mut trial = i as i32 | (i+1) as i32;\n        if (trial == n) {\n          res.push(i);\n          found = true;\n          break\n        }\n      }\n      if !found {\n        res.push(-1);\n      }\n\n    }\n    res\n  }\n}\n```
['Rust']