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```\nclass Solution {\npublic:\n    int maxProduct(vector<int>& nums) {\n\n    int n=nums.size();\n    int ans = INT16_MIN;\n    for (int i = 0; i < n - 1; i++)\n    {\n        for (int j = i + 1; j < n; j++)\n        {\n\n            ans = max(ans, ((nums[i] - 1) * (nums[j] - 1)));\n        }\n    }\nreturn ans;\n\n\n    }\n};\n```
['C++']